|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
using setProperty methods of ObjectMessage class?? |
« View previous topic :: View next topic » |
Author |
Message
|
chanchal |
Posted: Tue Apr 13, 2004 6:44 am Post subject: using setProperty methods of ObjectMessage class?? |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue Apr 13, 2004 7:04 am Post subject: |
|
|
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 |
|
 |
chanchal |
Posted: Tue Apr 13, 2004 7:29 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue Apr 13, 2004 7:58 am Post subject: |
|
|
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 |
|
 |
chanchal |
Posted: Tue Apr 13, 2004 9:12 am Post subject: |
|
|
Apprentice
Joined: 30 Jan 2004 Posts: 38
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|