Author |
Message
|
leitao |
Posted: Mon May 23, 2005 4:51 am Post subject: Mq converts JMSObjectMessages to JMSBytesObject. |
|
|
Novice
Joined: 23 May 2005 Posts: 22 Location: Campinas - São Paulo - Brasil
|
Hello,
I am using Websphere 5.0.2.6 and MQ 530.9 CSD09. and i am noticing some interesting problem.
My ejb is sending a JMSObjectMessage to a queue, this queue is handled by webSphere MQ. there is a MDB listening this queue, but when a onMessage event occurs, _surprise_, my message has a JMSBytesMessage Cast. it changed from JMSObjectsMessage to JMSBytesObject.
Any idea what is happening here?
it seems to me a problem with Mq coding.. am i in the correct path?
Thanks
Breno Leitao _________________ Breno Henrique Leitão
CPqD IT & Telecom |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon May 23, 2005 5:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
One question:
What are the attributes of your target queue?
More specifically targetClient ?
If you don't have the RFH header I would expect your JMSObjectMessage to be returned as JMSBytesMessage.
Just extract the bytes, put them into a byte output stream ... use that as byte input stream and get your object from the object input stream.
Enjoy  |
|
Back to top |
|
 |
leitao |
Posted: Mon May 23, 2005 6:50 am Post subject: |
|
|
Novice
Joined: 23 May 2005 Posts: 22 Location: Campinas - São Paulo - Brasil
|
fjb_saper,
Sorry, what is RFH?
I suppose the code is correct, once it was running in jboss, and am i porting to the websphere + mq. So, i dont wish to change the code.\
Any idea?
Thanks in advance _________________ Breno Henrique Leitão
CPqD IT & Telecom |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 23, 2005 6:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The RFH is technically known as the MQRFH2 header. It provides an additional set of mapping between the JMS header fields and the MQ header fields.
Confirm that the targetClient property of the QueueDestination you are using is set to "JMS". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
leitao |
Posted: Mon May 23, 2005 6:52 am Post subject: |
|
|
Novice
Joined: 23 May 2005 Posts: 22 Location: Campinas - São Paulo - Brasil
|
BTW, what is the attributes of my targetQUEUE/targetClient you wanna see?
Thank you _________________ Breno Henrique Leitão
CPqD IT & Telecom |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon May 23, 2005 6:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
leitao wrote: |
BTW, what is the attributes of my targetQUEUE/targetClient you wanna see? |
The property of the Queue Destination that you are retrieving or creating, that is called 'targetClient'.
If you do not understand this, ask your WAS administrator. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
leitao |
Posted: Mon May 23, 2005 7:37 am Post subject: |
|
|
Novice
Joined: 23 May 2005 Posts: 22 Location: Campinas - São Paulo - Brasil
|
Sure,
I got confused once i use a portuguese translation of WebSphere.
My targetClient is JMS. it was MQ before, and i changed it to JMS and the same problems still ocurring.
Thank you _________________ Breno Henrique Leitão
CPqD IT & Telecom |
|
Back to top |
|
 |
leitao |
Posted: Mon May 23, 2005 8:10 am Post subject: |
|
|
Novice
Joined: 23 May 2005 Posts: 22 Location: Campinas - São Paulo - Brasil
|
Look:
<factories xmi:type="resources.jms.mqseries:MQQueue" xmi:id="MQQueue_1115725008085" name="StartProcessReceive" jndiName="queue/cbill/StartProcessReceive" persistence="APPLICATION_DEFINED" priority="APPLICATION_DEFINED" specifiedPriority="0" expiry="APPLICATION_DEFINED" specifiedExpiry="0" baseQueueName="START.PROCESS.RECEIVE" useNativeEncoding="false" integerEncoding="Normal" decimalEncoding="Normal" floatingPointEncoding="IEEENormal" targetClient="JMS" queueManagerPort="0"/> _________________ Breno Henrique Leitão
CPqD IT & Telecom |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon May 23, 2005 10:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
leitao wrote: |
Sure,
I got confused once i use a portuguese translation of WebSphere.
My targetClient is JMS. it was MQ before, and i changed it to JMS and the same problems still ocurring.
Thank you |
But is it JMS on both the sending and the receiving side ?
By the way in the URI you do not specify JMS or MQ but the values 0 or 1....(see Using java manual and values of constants)
Enjoy  |
|
Back to top |
|
 |
leitao |
Posted: Tue May 24, 2005 3:14 am Post subject: |
|
|
Novice
Joined: 23 May 2005 Posts: 22 Location: Campinas - São Paulo - Brasil
|
Quote: |
But is it JMS on both the sending and the receiving side ? |
I am supposed to configure JMS or MQ only in the queue, in Resources->WebSphere MQ. Nothing to see with sender and receiver (MDB). Correct?
Quote: |
By the way in the URI you do not specify JMS or MQ but the values 0 or 1....(see Using java manual and values of constants) |
That's the way the config file was in my filesystem. I don't know. it's unlikely to be wrong. don't forget i am using Websphere 5.0.
Thanks _________________ Breno Henrique Leitão
CPqD IT & Telecom |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 24, 2005 12:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
No but all with the JMSDestinations.
If you're using WAS you are correct and the parm for the targetClient will take "JMS" or "MQ".
Now the real problem is the setting for the sender application. I understand your receiver is an MDB. If the producer/sender is a legacy (non JMS) system it is very unlikely that you will get an RFH header.
The JMS Destination for the sender application must be defined as targetClient=JMS. If it is not the RFH header gets stripped from the message at put time and you never get it.
Enjoy  |
|
Back to top |
|
 |
leitao |
Posted: Tue May 24, 2005 12:25 pm Post subject: |
|
|
Novice
Joined: 23 May 2005 Posts: 22 Location: Campinas - São Paulo - Brasil
|
Hey Man,
It worked, you were fully correct. The problem was with an MQ Destionation Queue that i did see.
Tks _________________ Breno Henrique Leitão
CPqD IT & Telecom |
|
Back to top |
|
 |
|