ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Exclusively Read Message from the MQ Queue using JMS

Post new topic  Reply to topic
 Exclusively Read Message from the MQ Queue using JMS « View previous topic :: View next topic » 
Author Message
ravi_sri24
PostPosted: Fri Jun 29, 2007 3:04 am    Post subject: Exclusively Read Message from the MQ Queue using JMS Reply with quote

Voyager

Joined: 11 May 2006
Posts: 83

Hi,

//Start the connection
qConnection.start();
System.out.println("Connection Started\n");
session = qConnection.createQueueSession(boTransacted, Session.AUTO_ACKNOWLEDGE);
//Create queue object
queue = session.createQueue("in");
qsender = session.createSender(queue);
queueReceiver = session.createReceiver(queue);
System.out.println("Connection Started\n");

here am uisng the Queue name is 'in' my application only want to exclusively read messages from this queue

where should i mention the properties for this, is any body having the idea a bout how to read exclusively messages from queue using JMS

Thanks in advance for Help
Back to top
View user's profile Send private message
mehedi
PostPosted: Fri Jun 29, 2007 6:24 am    Post subject: Open Input exclusive option (MQC.MQOO_INPUT_EXCLUSIVE ) Reply with quote

Centurion

Joined: 11 Nov 2001
Posts: 102
Location: PSTech

Ravi ,
Use the open input exclusive option (MQC.MQOO_INPUT_EXCLUSIVE ) when creating the queue object.

The list of options from the Using Java manual

MQQueue

public MQQueue(MQQueueManager qMgr, String queueName, int openOptions,
String queueManagerName,
String dynamicQueueName, String alternateUserId)
throws MQException;
Public constructor which allows users to create MQQueue subclasses.

Parameters
qMgr - the object which represents the queue manager on which the queue resides. Valid options are:
MQC.MQOO_ALTERNATE_USER_AUTHORITY
MQC.MQOO_BIND_AS_Q_DEF
MQC.MQOO_BIND_NOT_FIXED
MQC.MQOO_BIND_ON_OPEN
MQC.MQOO_BROWSE
MQC.MQOO_FAIL_IF_QUIESCING
MQC.MQOO_INPUT_AS_Q_DEF
MQC.MQOO_INPUT_SHARED
MQC.MQOO_INPUT_EXCLUSIVE
MQC.MQOO_INQUIRE
MQC.MQOO_OUTPUT
MQC.MQOO_PASS_ALL_CONTEXT
MQC.MQOO_PASS_IDENTITY_CONTEXT
MQC.MQOO_SAVE_ALL_CONTEXT
MQC.MQOO_SET
MQC.MQOO_SET_ALL_CONTEXT
MQC.MQOO_SET_IDENTITY_CONTEXT
MQC.MQOO_RESOLVE_LOCAL_Q
Back to top
View user's profile Send private message MSN Messenger
fjb_saper
PostPosted: Fri Jun 29, 2007 10:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You need to check what the option would be in URI form:
Session.createQueue("queue:///IN?<property>=<value>")

The using java manual might tell you how to set the right property and value. You could as well check out your options of doing this in JNDI. As a last resort you could create an alias with default open option exclusive and use that.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Exclusively Read Message from the MQ Queue using JMS
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.