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 » How to set JMS property on a MQ Message

Post new topic  Reply to topic
 How to set JMS property on a MQ Message « View previous topic :: View next topic » 
Author Message
mangoMan
PostPosted: Wed Jan 11, 2006 9:21 am    Post subject: How to set JMS property on a MQ Message Reply with quote

Acolyte

Joined: 16 Oct 2003
Posts: 69

Hi,

I put a message on an MQSeries (v5.3) queue using a java client application. I have a listner MDB running on WAS which picks up the message and inside this MDB I want to lookup a user defined property. This is what I plan on doing inside the MDB txtMsg.getStringProperty("SpecialProp")

How do I set this up in my java client which is dealing with raw MQ. Essentially, I want to know how to map MQ message to a JMS message so I can create new property fields.
Back to top
View user's profile Send private message
mvic
PostPosted: Wed Jan 11, 2006 9:30 am    Post subject: Re: How to set JMS property on a MQ Message Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

mangoMan wrote:
I put a message on an MQSeries (v5.3) queue using a java client application.


It will be easiest, if you want to get using JMS, if you also put using JMS. Is this a possibility?

A "raw" MQ message can't have user-defined properties, unless you define the binary format yourself. The way MQ's JMS does this is by encoding in text using an XML-like format, and placing this in the "raw" MQ message. The MQ JMS classes in putter and getter apps have all this built in.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 11, 2006 10:05 am    Post subject: Re: How to set JMS property on a MQ Message Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mvic wrote:
A "raw" MQ message can't have user-defined properties, unless you define the binary format yourself. The way MQ's JMS does this is by encoding in text using an XML-like format, and placing this in the "raw" MQ message. The MQ JMS classes in putter and getter apps have all this built in.


Well, a little more technically, the MQ JMS API uses the MQRFH2 header in a very well documented manner, and includes 'folders' in that header that end up containing the properties.

And it will be a significantly large project to build a proper JMS header yourself. So as mvic says... Use JMS.

Or don't use JMS Properties.
_________________
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 » IBM MQ Java / JMS » How to set JMS property on a MQ Message
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.