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 » using setProperty methods of ObjectMessage class??

Post new topic  Reply to topic
 using setProperty methods of ObjectMessage class?? « View previous topic :: View next topic » 
Author Message
chanchal
PostPosted: Tue Apr 13, 2004 6:44 am    Post subject: using setProperty methods of ObjectMessage class?? Reply with quote

Apprentice

Joined: 30 Jan 2004
Posts: 38

Hey,
I am using JMS to send /receive messages and I am using ObjectMessage class to send request object.Can anybody tell me when to use setProperty methods of these class.I mean I can send any data in body part and retrieve it on receiver side then whats the need of sending any value as message property.Is there any advantage of sending some values using these setProperty methods ??
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 13, 2004 7:04 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can use properties for the following things:
  • message routing without having to know what the content of the message is
  • As filters for the receive() method so that multiple message types can be received by different things
  • to put application level data into the MQ Rules And Formatting Header (MQRFH2) so it can be used by non-JMS and non-Java applications
  • lots of other things

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
chanchal
PostPosted: Tue Apr 13, 2004 7:29 am    Post subject: Reply with quote

Apprentice

Joined: 30 Jan 2004
Posts: 38

Hi, In my project first and 3'rd reasons of using these methods wont be useful.I didn't understand the 2'nd reason (as a filter for receive methods).Can you explain this point little bit more elaborately.

Thanks,
chanchal
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Apr 13, 2004 7:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Using Java - Chapter 3, Section 'Message Selectors' wrote:
A message contains a built-in facility to support application-defined property values. In effect, this provides a mechanism to add application-specific header fields to a message. Properties allow an application, using message selectors, to have a JMS provider select or filter messages on its behalf, using application-specific criteria. Application-defined properties must obey the following rules:

Property names must obey the rules for a message selector identifier.
Property values can be boolean, byte, short, int, long, float, double, and string.
The JMSX and JMS_ name prefixes are reserved.


_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
chanchal
PostPosted: Tue Apr 13, 2004 9:12 am    Post subject: Reply with quote

Apprentice

Joined: 30 Jan 2004
Posts: 38

Thanks a lot.
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 » using setProperty methods of ObjectMessage class??
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.