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 » Urgent : MQ JAVA to JMS : Unable to deserialise object

Post new topic  Reply to topic
 Urgent : MQ JAVA to JMS : Unable to deserialise object « View previous topic :: View next topic » 
Author Message
tivoli
PostPosted: Wed Dec 10, 2003 3:18 am    Post subject: Urgent : MQ JAVA to JMS : Unable to deserialise object Reply with quote

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
View user's profile Send private message Yahoo Messenger
tivoli
PostPosted: Wed Dec 10, 2003 7:00 pm    Post subject: any reply ? Reply with quote

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
View user's profile Send private message Yahoo Messenger
tivoli
PostPosted: Wed Dec 10, 2003 7:46 pm    Post subject: further clarifications Reply with quote

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
View user's profile Send private message Yahoo Messenger
bower5932
PostPosted: Thu Dec 11, 2003 6:54 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
valar
PostPosted: Thu Aug 26, 2004 9:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Thu Aug 26, 2004 12:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Thu Aug 26, 2004 2:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
valar
PostPosted: Fri Aug 27, 2004 4:36 am    Post subject: Reply with quote

Novice

Joined: 26 Aug 2004
Posts: 16

OK, it works.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Urgent : MQ JAVA to JMS : Unable to deserialise object
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.