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 » A complete beginner to MQMD and RFH2 headers

Post new topic  Reply to topic Goto page 1, 2  Next
 A complete beginner to MQMD and RFH2 headers « View previous topic :: View next topic » 
Author Message
yuva670
PostPosted: Tue Feb 27, 2007 3:17 am    Post subject: A complete beginner to MQMD and RFH2 headers Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

Hi,
I want to know everything that has to be known about the MQMD and RFH2 headers. What are those? Where and why and when are those used? Please help me out with this...Thanks in advance..
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 27, 2007 3:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

MQMD & MQRFH2 are the MQ headers used to hold the JMS header information - I'm assuming this is the focus of your interest given the section you've posted in.

You'll find complete details of their format & their use in the Application Programming Guide & Reference manuals. You'll find a detailed explaination of their relationship with JMS in the Using Java manual.

Happy Reading!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
yuva670
PostPosted: Tue Feb 27, 2007 4:16 am    Post subject: Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

Thanks vitor ...
i need some more details .... I need to pick a message from a MQ (which would be a XML message) and translate that to OSI(pretty much a string object)...but i need to fetch some details(Queue information) from the MQMD header and put them as RFH2 header attach with my actual message and send that to another system(again putting it onto another queue)......

couple of questions --.>
1. How do i access MQMD header which comes along with the actual message
2. Whats the structure of RFH2 header? (which would help me in putting the values accordingly)

may be an example ...which shows how to access details in MQMD and then putting them into RFH2 format would help me a lot

awaiting a reply asap .....
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 27, 2007 4:23 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

yuva670 wrote:
1. How do i access MQMD header which comes along with the actual message


If using non-Java, it's supplied as an object by the MQGET call. If using JMS the equivalent values are returned in the JMS header.

yuva670 wrote:
2. Whats the structure of RFH2 header? (which would help me in putting the values accordingly)


It's the structure shown in the manuals I mentioned. Again if you're using JMS you should not need to interfer with this process. The mapping is handled for you as described in the other manual I mentioned.

yuva670 wrote:
may be an example ...which shows how to access details in MQMD and then putting them into RFH2 format would help me a lot


Like the sample code supplied by IBM with the queue manager, that sort of thing?

There are plenty of snippets on the web if you need them. Try the developer works area of the IBM site. Again I repeat you don't want to be messing with this if you're using JMS.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
yuva670
PostPosted: Tue Feb 27, 2007 4:52 am    Post subject: Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

Thanks Vitor.
I will read the references that you had mentioned earlier and get information about these things. I got the AP guide and reference but couldn't find the Using Java manual.
Thanks once again.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 27, 2007 4:58 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

yuva670 wrote:
I got the AP guide and reference but couldn't find the Using Java manual.


Available from whatever location you got the others from, either the library on the IBM site or indeed the online Info Centre.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
yuva670
PostPosted: Wed Feb 28, 2007 5:14 am    Post subject: Trying to send and receive message to/from Websphere MQ Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

Hi,
I am trying to send/receive messages from Websphere MQ from/to the Websphere Application Server 6.0. I have made the settings accordingly in the admin console of the server into the Websphere MQ JMS provider. When I invoke the receiver and set the connection name as provided in the admin console (MQ Connection factory), I get an exception:
Exception: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'Ender'
where Ender is the queue manager created in the Websphere MQ.
Please help...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 28, 2007 5:29 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to retrieve the LinkedException from that JMSException.

This will give you the MQ Reason Code for the failure.

Then you can troubleshoot the failure using that.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
yuva670
PostPosted: Wed Feb 28, 2007 5:41 am    Post subject: Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

Thanks...
Should I use the getCause method to retrieve the LinkedException?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 28, 2007 5:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I believe you need to use the getLinkedException() method to ... get.. the LinkedException...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
yuva670
PostPosted: Wed Feb 28, 2007 8:45 pm    Post subject: Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

I got the LinkedException:

com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2059
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:219)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:179)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindingsManagedConnectionFactoryJ11.java:215)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:84)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:168)
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory.java:772)
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:697)
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.java:657)
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java:153)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:526)
at com.ibm.mq.MQSPIQueueManager.<init>(MQSPIQueueManager.java:69)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2007)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1496)
at com.ibm.mq.jms.MQConnection.<init>(MQConnection.java:715)
at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:4630)
at com.ibm.qbda.mq.p2p.QReceiver.setConnection(QReceiver.java:233)
at com.ibm.qbda.mq.p2p.QReceiverUI.connectionEntered(QReceiverUI.java:105)
at com.ibm.qbda.mq.p2p.QReceiverUI.connEtoC1(QReceiverUI.java:135)
at com.ibm.qbda.mq.p2p.QReceiverUI.access$1(QReceiverUI.java:130)
at com.ibm.qbda.mq.p2p.QReceiverUI$IvjEventHandler.propertyChange(QReceiverUI.java:50)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:265)
at java.awt.Component.firePropertyChange(Component.java:6791)
at com.ibm.qbda.mq.common.ConnectionPanel.setConnectionEntered(ConnectionPanel.java:653)
at com.ibm.qbda.mq.common.ConnectionPanel.setConnection(ConnectionPanel.java:635)
at com.ibm.qbda.mq.common.ConnectionPanel.connEtoC1(ConnectionPanel.java:105)
at com.ibm.qbda.mq.common.ConnectionPanel.access$1(ConnectionPanel.java:100)
at com.ibm.qbda.mq.common.ConnectionPanel$IvjEventHandler.actionPerformed(ConnectionPanel.java:56)
at java.awt.Button.processActionEvent(Button.java:411)
at java.awt.Button.processEvent(Button.java:379)
at java.awt.Component.dispatchEventImpl(Component.java:3712)
at java.awt.Component.dispatchEvent(Component.java:3574)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:536)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:237)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:187)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:181)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:136)
Linked com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2059
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Feb 28, 2007 10:33 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

2059:
Either the QMGR is not running, for BINDINGS mode or the listener is not running for CLIENT mode.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
yuva670
PostPosted: Thu Mar 01, 2007 10:37 pm    Post subject: Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

Hi,
Both the Queue manager and Listener are running.
I am working with the Rational Application Developer and have Websphere MQ installed on the system. Now I am trying to set the Websphere MQ JMS provider in the admin console of the RAD. I have created a queue manager and a queue on that. And have set things accordingly in the admin console. In the admin console, I have provided the queue manager name and the base queue name.
I checked the queue manager and the listener in the Webspher MQ, they are running.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Mar 02, 2007 1:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

You need to do a search in here. 2059 is a very common error that has a wide variety of possible causes too extensive to list here; some of which have nothing to do with either your code or your settings, but external influences. I would widen the description of 2059 given by vennela to "listener not running or inaccessable". If you look through the previous experiences of others you'll get a "laundry list" of things to check through in your own instalation.

My tip -if you're confident that your settings are correct, don't spend too much time bashing away at them, but turn your focus to other possible causes.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
yuva670
PostPosted: Fri Mar 09, 2007 4:13 am    Post subject: Reply with quote

Novice

Joined: 27 Feb 2007
Posts: 16
Location: Bangalore

Hi,
Now, I came to know that we shouldn't mix the JMS and MQ configuration while dealing with the messaging with Websphere MQ.
Thanks for the help. I set up the things using JMS only and the application is working fine. I am able to communicate from the WAS to Websphere MQ using the 'Websphere MQ links' option in the WAS.
But I have a new problem now. Sometimes the receiver channel in the Websphere MQ (in WAS it's the sender) is inactive because of the sequence number mismatch. I tried resetting the sequence number in the Websphere MQ but no use. I am facing this problem frequently. Any suggestions please?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » A complete beginner to MQMD and RFH2 headers
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.