| Author | 
		  Message
		 | 
		
		  | wmq_guy | 
		  
		    
			  
				 Posted: Tue Nov 02, 2004 11:40 am    Post subject: URGENT* reading MQMD data with Message Driven Bean? | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Nov 02, 2004 12:45 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wmq_guy | 
		  
		    
			  
				 Posted: Tue Nov 02, 2004 1:03 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Nov 02, 2004 1:09 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wmq_guy | 
		  
		    
			  
				 Posted: Tue Nov 02, 2004 1:20 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Nov 02, 2004 7:06 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |