|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Getting all JMS message properties |
« View previous topic :: View next topic » |
Author |
Message
|
eliman |
Posted: Mon Aug 22, 2005 11:25 am Post subject: Getting all JMS message properties |
|
|
Newbie
Joined: 20 Jul 2005 Posts: 1
|
I'm trying to write some classes to abstract some of the MQ intricacies away so that some of the simpler code from other devs at my job can more easily access Queues (albeit, less efficiently or flexibly). I just finished hooking message selectors into my abstraction and now I'd like to be able to pull all the usr properties out all at once.
I noticed that properties show up in messages in the form:
Quote: |
<PropertyName dt='dataType'>
value
</PropertyName>
|
From looking at the Message API, it seems like I can do a myMessage.getPropertyNames(). From here, it seems like I should be able to do something generic like myMessage.getPropertyValue("myProperty") for each thing in the enumeration, but this would be messy since the getter/setter methods for properties all take and return primitive data types. I'd like to be able to get the contents of the dt parameter so I can just loop through the property names and populate something like a small hashtable out of the data. Unfortunately, it doesn't look like there's anything that lets me do anything like that in the Message class.
Granted, I understand that I can just pad the front of the message data with these properties, but since the properties are going to be pretty small and since we might want to use them in selectors, I wanted to see about putting them in usr. Can I do what I'm trying to do? Is there a better way? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 22, 2005 4:46 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I hope that you realize the predicament you are in.
a) Performance : Any property in the usr folder is a BIG performance hit in the message selector.
If you need this type of selection read all messages from the inbound queue and dispatch them onto their own property specific queues.
Enjoy  |
|
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
|
|
|
|