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 » JMS Message Type

Post new topic  Reply to topic
 JMS Message Type « View previous topic :: View next topic » 
Author Message
iceage
PostPosted: Wed Apr 12, 2006 6:37 pm    Post subject: JMS Message Type Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

folks ... Got a question on resolution of JMS Message Type.

I see that JMS has five different message types (Byte , Text , Map , Stream and Object) .. And on receiving the message , you can do an "instanceof" of classname to find out the type of the message .

But i have seen and observed is , by default messages with out RFH2 header and MQMD.format set to MQSTR are treated as JMS Text and with format MQFMT_NONE as JMS Byte ..

Where does this behaviour come from ? , who does the resolution to particular Message class and is it from MQMD format , if so what happens with other JMS providers ? ..

How can i find more details on this , any documents / link will be useful .

Also when i print out the queue name , it displays as

Queue:///<QueueName> or

Queue:/<QmgrName>/<QueueName>

Where can i find more information on specification/convention used to describe the queue names ? .. MQSeries Using Java wasnt that helpful ..

Thanks ..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 12, 2006 7:33 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You need to read up on JMS.

This is a default behavior. If the message has a format of MQSTR is can be converted (CCSID) and by default is a TextMessage.

If it has format none it cannot be converted and by default has to be treated as a BytesMessage.

As to the conventions for queue naming in J2EE this is a resource definition:

queue://qmgr/queuename?attr1=val1&attrx=valx

ex:
Code:

String qn = "queue://MYMGR/MYQUEUE?targetClient=1";
Queue myq = session.createQueue(qn);


Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
briancop
PostPosted: Thu Apr 13, 2006 1:53 am    Post subject: Reply with quote

Apprentice

Joined: 04 Apr 2005
Posts: 28
Location: Hursley, UK

The normal JMS->JMS messaging behaviour over WebSphere MQ is that all messages contain an RFH2, which along with lots of other info contains a property indicating which of the 5 (6 if you include no body) JMS message types it is. If you send a non-JMS message from e.g. an MQI-based application over WebSphere MQ to a JMS consumer, that is when the situation you describe occurs, in which case the JMS provider implementation has been written such that it uses Text if the message is formatted as a string and Bytes (unformatted message) otherwise.

As for other JMS providers, well the question doesn't really arise, since MQMD and RFH2 are WebSphere MQ concepts, so non-WebSphere MQ JMS providers will not have to know how to handle MQMD and RFH2 contents.

Brian
Back to top
View user's profile Send private message
iceage
PostPosted: Thu Apr 13, 2006 4:00 pm    Post subject: Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

Thanks all for your valuable inputs.

It really helps and any links to JMS readups are appreciated.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 13, 2006 6:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

http://onesearch.sun.com/search/onesearch/index.jsp?charset=utf-8&qt=JMS+%26+Specification&rf=0&rt=1&nh=10&cs=0&y=0&x=0&col=developer-reference
Look at the learning and reference tabs.

This should give you plenty to go through.

Enjoy
_________________
MQ & Broker admin
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 » JMS Message Type
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.