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 » Getting all JMS message properties

Post new topic  Reply to topic
 Getting all JMS message properties « View previous topic :: View next topic » 
Author Message
eliman
PostPosted: Mon Aug 22, 2005 11:25 am    Post subject: Getting all JMS message properties Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 22, 2005 4:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Getting all JMS message properties
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.