Author |
Message
|
tivoli |
Posted: Wed Dec 10, 2003 3:18 am Post subject: Urgent : MQ JAVA to JMS : Unable to deserialise object |
|
|
Newbie
Joined: 10 Dec 2003 Posts: 3
|
Hi MQ masters,
I am using a (MQ Program) Java program written in Native MQ Java bindings and writing a customised serializeable MQ Object and putting it into the queue. A JMS program retrieving from the queue retrieve the message as a JMSBytesMessage.
How can the JMS program reserialise the bytemessage into the original MQ Object ?
Should the setting and changes be done on the MQ Program or in the JMS program ?
Can I change any setting in the MQ program so that the JMS can receive the MQ message as a Object Message ?
Cheers |
|
Back to top |
|
 |
tivoli |
Posted: Wed Dec 10, 2003 7:00 pm Post subject: any reply ? |
|
|
Newbie
Joined: 10 Dec 2003 Posts: 3
|
Hi MQ experts,
any way to deserialise the object ?
Is there any setting I can set in the native Java MQ API so the JMS could serialise the message as a ObjectMessage ?
Thanks. |
|
Back to top |
|
 |
tivoli |
Posted: Wed Dec 10, 2003 7:46 pm Post subject: further clarifications |
|
|
Newbie
Joined: 10 Dec 2003 Posts: 3
|
Hi friends,
more elaboration about more scenario :
I am using native MQ java to write a customised object 'MQContainer' into the MQ queue. When JMS prog picks up the message, it picks it up as a JMSBytesMessage and could not serialise the message into 'MQContainer'.
What should It do to enable the talking ?
1) Is there any setting I can do in the native MQ java program to enable JMS to read the message an ObjectMessage ?
2) Is there any setting I can do in the JMS program to read the JMSbyteMessage as a ObjectMessage ?
Much thanks and regards. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Dec 11, 2003 6:54 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I've never tried to write an object with the java api and pick it back up with the jms api. I'd guess that there is something inside the RFH2 header that the java isn't setting so that jms can pick it up. I'd suggest one of two things:
1. Write your object out using the jms api
2. Do #1 so that you can look at the message on the queue. Compare it to your java programs message. Fix your program so that the messages are identical. |
|
Back to top |
|
 |
valar |
Posted: Thu Aug 26, 2004 9:39 am Post subject: |
|
|
Novice
Joined: 26 Aug 2004 Posts: 16
|
I have the similar problem. I send an ObjectMessage and receive an com.ibm.jms.JMSBytesMessage.
Has anybody successed to send and receive an ObjectMessage? |
|
Back to top |
|
 |
EddieA |
Posted: Thu Aug 26, 2004 12:55 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Have you tried the actions suggested in the previous post.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 26, 2004 2:35 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You can always try to receive the bytes in the message.
Put them into a buffer (if possible as bytestream...)
read the object from the buffer.
Check out what type of object you received and cast accordingly.
Check out your io classes.
Typical java stuff.
O.K. it is not reading from an ObjectMessage but it should allow you to do the trick with a BytesMessage.
Enjoy |
|
Back to top |
|
 |
valar |
Posted: Fri Aug 27, 2004 4:36 am Post subject: |
|
|
Novice
Joined: 26 Aug 2004 Posts: 16
|
|
Back to top |
|
 |
|