Hi Joe,

From your first post, you said:

"Now that JMS is pulling the message off of the Q, it bombs.  Apparently,

JMS is looking for a text message, but since the RFH2 Header exists, it

considers the entire message to be in Byte Format."


A more specific description of the behaviour would help, but from the above it sounds like the application is throwing a ClassCastException when attempting to assign the received message to a variable defined as TextMessage. When the JMS client receives a message without an RFH2, it decides on the type of the message based on the MQMD.Format value, where MQFMT_STRING ("MQSTR ") gives TextMessage and everything else gives BytesMessage. Checking the value of the MQMD.Format field would be a good place to start. If the value of MQMD.Format is not MQFMT_STRING and can't be because of constraints in your application environment, then it is still possible to work with the BytesMessage - it will just be necessary to retrieve the contents and turn it into a string in the application code instead of in the JMS layer.


Regards, James.


DeBlassio, Joe wrote:



Dennis,



Not being a JMS coder, I can't help but ask the following.



So, JMS performs the get with Correlid on the MD.  Then after
matching, JMS adds the RFH2?  Could the JMS coders be performing the
get improperly?  Is it necessary to tell JMS, somehow, to look in the
MD for the Correlid?



Or do we need to have a JMS program that just does a JMS get followed
by a put (to get the JMS RFH2 built).  Then have the program which
matches on the Correlid execute against the message with the JMS RFH2.



Currently I am sending to JMS a message with the Correlid in the MD
and No RFH2 Header.  The JMS guys just can't seem to match the
Correlid from the MD.  And I'm really struggling trying to help them
out since I don't know JMS.



Thanks so much for your help.





-----Original Message-----
From: MQSeries List [mailto:[EMAIL PROTECTED] On
Behalf Of Miller, Dennis
Sent: Saturday, February 26, 2005 7:43 PM
To: [email protected]
Subject: Re: MQSI 2.1 RFH2 Header for JMS - Help



If the messages are going from from a non-JMS application to a JMS

application, somewhere along the way an RFH2 header needs to be

constructed.  Trying to do it in the sending application or in MQIS is

the hard way.  Just send a message without the RFH2 header and the JMS

receiver will do it automatically by pulling appropriate info out of the

MD.



Probably the reason JMS is having difficulty without a JMS header on the

inbound message is because of the way JMS transforms msgid and correlid

with an "ID:" prefix when it builds the RFH2 header.  It may take som

futzing to figure out exactly how to get JMS to match on correlid, but

you definitely don't need an RFH2 header to do it.





regards





-----Original Message-----

From: DeBlassio, Joe [mailto:[EMAIL PROTECTED]

Sent: Friday, February 25, 2005 7:30 PM

To: [email protected]

Subject: MQSI 2.1 RFH2 Header for JMS - Help





Hello,



I am working with some JMS Developers on a Request Reply Application.

This application sends a request thru mqsi (where conversion from xml to

copybook occurs) to the mainframe.  The mainframe sends the reply back

to mqsi (where copybook to xml conversion occurs) and on to JMS where

JMS matches on Correlid.  I have verified that the Correlid is making

the round trip.



Unfortunately, JMS can't seem to pull the message off the Q without

there being an RFH2 Header with jms.Cid equaling the Correlid.



Now that JMS is pulling the message off of the Q, it bombs.  Apparently,

JMS is looking for a text message, but since the RFH2 Header exists, it

considers the entire message to be in Byte Format.



Being an MQ person, I am interpreting for our JMS Developers.  Did

something get missed in MQSI?  Would someone be willing to share some

MQSI code that builds the RFH2 Header for jms?  Any thoughts and

directions would be greatly appreciated.



Thanks once again for any help.

Joe





Instructions for managing your mailing list subscription are provided in

the Listserv General Users Guide available at http://www.lsoft.com

Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html



Instructions for managing your mailing list subscription are provided in

the Listserv General Users Guide available at http://www.lsoft.com

Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html



Instructions for managing your mailing list subscription are provided
in the Listserv General Users Guide available at http://www.lsoft.com

Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html



Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

Reply via email to