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
- Create a new JMS message
- 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")
- Drop the message to migrated queue MQ 7 (from MQ 6 to MQ 7 queue)
- Go to UI, browse the message through JMS QueueBrowser
- Able to see all the application properties
Not working Scenario
- Create a new JMS message
- 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")
- Drop the message to newly create MQ 7 queue
- Go to UI, browse the message through JMS QueueBrowser
- 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?