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 » URGENT* reading MQMD data with Message Driven Bean?

Post new topic  Reply to topic
 URGENT* reading MQMD data with Message Driven Bean? « View previous topic :: View next topic » 
Author Message
wmq_guy
PostPosted: Tue Nov 02, 2004 11:40 am    Post subject: URGENT* reading MQMD data with Message Driven Bean? Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

if you are using a MDB, is it possible to read the MQMD to get certain fields out aside from just reading the message itself?
the message is from native MQ but it is getting picked up from a MDB
or is my only solution using the MQRFH2 for everything?

thanks


Last edited by wmq_guy on Tue Nov 02, 2004 1:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 02, 2004 12:45 pm    Post subject: Reply with quote

Grand High Poobah

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

Check out the Using java manual. It's platform independant. You will find a section about mappings from JMS to MQMD. This should answer all your questions.

Enjoy
Back to top
View user's profile Send private message Send e-mail
wmq_guy
PostPosted: Tue Nov 02, 2004 1:03 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

thanks for the reply.

I am looking at the manual Ch 12.
after my MDB received the message I am able to get the msgID and CorrelID fine with:
Code:

System.out.println(myTxtMsg.getJMSCorrelationID());


but in the manual it says I should also be able to get the PutApplName that was in the MQMD, it should now be JMSXAppID

how would I retrieve that, I do not see a method for such
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 02, 2004 1:09 pm    Post subject: Reply with quote

Grand High Poobah

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

Look at the getProperty methods on the message.
Pass one of the JMSXAppID as a constant in the property:
JMSC.JMSXAppID or something of the kind.

Enjoy
Back to top
View user's profile Send private message Send e-mail
wmq_guy
PostPosted: Tue Nov 02, 2004 1:20 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Oct 2004
Posts: 50

String s = txMQmsg.getStringProperty(JMSXApplID);

but it aint working..
what am I doing wrong?

Do I need to import com.ibm.mq.*; in my MDB??
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Nov 02, 2004 7:06 pm    Post subject: Reply with quote

Grand High Poobah

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

try
Code:
String s = txMQmsg.getStringProperty("JMSXApplID");

or txMQmsg.getPropertyNames and analyse the output to know how to ask for the right property....

Enjoy
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 » URGENT* reading MQMD data with Message Driven Bean?
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.