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 » General Discussion » ObjectMessage equivalent

Post new topic  Reply to topic
 ObjectMessage equivalent « View previous topic :: View next topic » 
Author Message
techno
PostPosted: Tue Apr 08, 2003 10:49 am    Post subject: ObjectMessage equivalent Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

How is JMS's ObjectMessage is interpreted in the implemented application using another language. ie, A Java client sending an ObjectMessage to an MQ application. This MQ application is not written in Java, but in Cobol or C. How does this application interpret sent ObjectMessage?

Thanks
Shiva.
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Apr 08, 2003 12:11 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Shiva:

Do you mean a JMS client or a MQ Base Java client?

If you are talking about JMS app, in the MQSeries Java manual, chapter 12, there is a section "Mapping JMS to a native MQSeries application".

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
techno
PostPosted: Tue Apr 08, 2003 1:29 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

JMS Client App Sending ObjectMessage. Where as the reader program is in C/Cobol. This receiver program receives the message and now how does it interpret ObjectMessage?
Back to top
View user's profile Send private message
techno
PostPosted: Tue Apr 08, 2003 1:53 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Adding to above message,

I went through that manual and they have not given exactly how does native application interpret the message. They gave something related to header mapping.

Thanks for your help
Shiva.
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Apr 08, 2003 2:21 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Are you asking if "JMS app PUTs a message containing characters, then would C app interpret them as characters or bytes or something esle"
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jefflowrey
PostPosted: Wed Apr 09, 2003 5:41 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you put a message on a queue that contains a Java object, I believe the data in that message will be binary data, and possibly packed in various ways. In addition, it would contain the java byte codes for the object methods as well as just the 'data'.

Any program that tried to read that message would have to understand how Java objects are encoded in order to be able to understand the data. I don't recommend trying to do this from COBOL or C.

If you want to share data between Java programs and non-java programs, the best way is to serialize the java object into some sort of text data, either an XML structure or something that can be interpreted by a COBOL copybook or a C structure. The Castor framework will allow you to transform Java objects into XML and vice versa.
Back to top
View user's profile Send private message
techno
PostPosted: Wed Apr 09, 2003 1:11 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Thank you. That answers my question.

Shiva.
Back to top
View user's profile Send private message
tingwen
PostPosted: Fri Dec 23, 2005 3:52 pm    Post subject: Reply with quote

Novice

Joined: 19 Aug 2005
Posts: 24

....If you want to share data between Java programs and non-java programs, the best way is to serialize the java object into some sort of text data, either an XML structure or something that can be interpreted by a COBOL copybook or a C structure. The Castor framework will allow you to transform Java objects into XML and vice versa......



if the data contains binary (like PDF, or picture), is java-serialization-to-XML-structure still the best approach?

wen
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Dec 23, 2005 4:29 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If the data is already a well known binary format, then it's not a Java object in the first place. So it wouldn't be put using an Object message. Likely it would either be put as a TextMessage with XML and binary data that has been base64 encoded, or as a BytesMessage with the raw binary data stream.

Regardless, without something like Message Broker in between two applications, both applications have to know the format of the message on the wire and be able to deal with it. Or at least, they both have to be able to deal with the message without corrupting it - like one is a specific app sending out business data, and the other is a general purpose queue-to-file program that just writes the bytes out without knowing what they are.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » ObjectMessage equivalent
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.