Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java API to MQ Series 1

Status
Not open for further replies.

richarsi

Programmer
May 23, 2002
1
GB
Our principle application uses the JMS API to put messages onto MQ. The Queues are permanant dynamic and each queue contains messages for a single topic.

We are trying to develop a utility to cycle through these JMS queues using the MQ Series Java API (this is does not use the JMS interface). However we are unable to open a connection to a queue when it has an open input count > 0. We get the following MQException (CC = 2 RC = 2042). Which is caused (we think) because another process (we suspect our JMS application) has opened the Queue INPUT_EXCLUSIVE.

However, the Java Console supplied with MQ is able to browse this Queue, and we suspect (again) that there must be a way for our utility to do the same?

I'm also guessing that this has something to do with the open options used to access the queue - we've tried many combinations without much success!

If anyone can shed some lighht on this I would be very greatful ;-)

Simon
 
If an application has opened the queue with INPUT_EXCLUSIVE, no other program can open that queue for INPUT, hence the problem you are seeing.

However you can open the queue for BROWSE only, regardless of any other programs. You will not be able to remove messages from the queue but you will be able to see the messages on it.

Note however that due to the unpredictable nature of multiple applications GETting the same queue that your browse application may not see every message that comes through.

Cheers,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top