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 » Mq converts JMSObjectMessages to JMSBytesObject.

Post new topic  Reply to topic
 Mq converts JMSObjectMessages to JMSBytesObject. « View previous topic :: View next topic » 
Author Message
leitao
PostPosted: Mon May 23, 2005 4:51 am    Post subject: Mq converts JMSObjectMessages to JMSBytesObject. Reply with quote

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
View user's profile Send private message MSN Messenger
fjb_saper
PostPosted: Mon May 23, 2005 5:57 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
leitao
PostPosted: Mon May 23, 2005 6:50 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Mon May 23, 2005 6:52 am    Post subject: Reply with quote

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
View user's profile Send private message
leitao
PostPosted: Mon May 23, 2005 6:52 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
jefflowrey
PostPosted: Mon May 23, 2005 6:56 am    Post subject: Reply with quote

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
View user's profile Send private message
leitao
PostPosted: Mon May 23, 2005 7:37 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
leitao
PostPosted: Mon May 23, 2005 8:10 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
fjb_saper
PostPosted: Mon May 23, 2005 10:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
leitao
PostPosted: Tue May 24, 2005 3:14 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
fjb_saper
PostPosted: Tue May 24, 2005 12:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
leitao
PostPosted: Tue May 24, 2005 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Mq converts JMSObjectMessages to JMSBytesObject.
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.