1

We are using the J2EE JMS API for browsing the queue ( J2EE jar dated 2/2/2010 from C:\Program Files\IBM\SDP70\runtimes\base_v61\lib)

Javax.jms.QueueBrowser queueBrowser = null;
queueBrowser =connection.getQueueSession().createBrowser(connection.getQueue());
Enumeration messageEnum = queueBrowser.getEnumeration();
int nMessages = 0;
while (messageEnum.hasMoreElements()){
   Object obj = messageEnum.nextElement();
   Message message = (Message) obj;
   messages.add(message);
   nMessages++;
}

When I try in debug mode in RAD 7.5 (using j2ee.jar dated 2/2/2010 from C:\Program Files\IBM\SDP70\runtimes\base_v61\lib)), I don’t see the application properties has been extracted from the messages using queueBrowser.getEnumeration();

I am using Websphere MQ 7.0.1.6

Could you please explain what I am doing wrong?


Just to elaborate, we are not seeing JMS application properties in the message though the JMS system properties are showing up in the newly create MQ 7 queues. The steps to recreate the error for understanding

Working Scenario

  1. Create a new JMS message
  2. Set the application properties in this JMS message using setStringProperty API call( e.g of application properties ERROR_CODE=ccs, ERROR_MSG="Unable to find meta data")
  3. Drop the message to migrated queue MQ 7 (from MQ 6 to MQ 7 queue)
  4. Go to UI, browse the message through JMS QueueBrowser
  5. Able to see all the application properties

Not working Scenario

  1. Create a new JMS message
  2. Set the application properties in this JMS message using setStringProperty API call( e.g of application properties ERROR_CODE=ccs, ERROR_MSG="Unable to find meta data")
  3. Drop the message to newly create MQ 7 queue
  4. Go to UI, browse the message through JMS QueueBrowser
  5. Not able to see all the application properties though we can see the JMS system properties ( JMS_IBM*)

We took the dump of message from the newly created queue. We see the application properties in the message dump. But when we extract the message through api Enumeration messageEnum = queueBrowser.getEnumeration();

enumeration list messages which doesn’t show application properties in all the messages for the newly created queue. But same API can extract the message with application properties for the migrated queues.

We are using Websphere Application Server v 6.1 and Standalone MQ Server v7.0.1.6

Could you please explain what I am doing wrong?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
  • The post title suggests you want the properties of the queue, whereas the text of the post suggests yuo are looking for the `MQMD.ApplID` from the message header. Could you clarify what it is you are looking for? Perhaps update the question with the output that doesn't have the field and the code that produces that output? – T.Rob Dec 20 '12 at 05:08

1 Answers1

0

We used LIKE command to create a new MQ V7 queue using queue template of v6 to v7 migrated queues. Looks like some properties while directly creating V7 queue which prevent us not to show the application properties. Everything got working after creating queue like one of v6 to v7 migrated queues using LIKE command.

Thanks Rob and Shashi for your reply.