title: How to programmatically retrieve JMSMessage Class value from a JMS message
body: <p>I am using JMS to put a message on MQ and an MDB that uses JMS classes ( not MQ specific classes ) to read and process the message. </p>
  
  <p>When I print the message ( which uses the message's toString() method, I get the output below </p>
  
  <p>I want to programmatically retrive the value of 'jms_text', 'jms_bytes', etc. as the case maybe. </p>
  
  <p>How can I achieve that? I tried to find the properties, but that also did not give me this information. </p>
  
  <pre><code>+++ SAMPLE MDB: Text Message =&gt; Testing sending message to error queue
  [3/15/14 8:54:51:988 EDT] 00000323 SystemOut     O Received message: 
  
   JMSMessage class: jms_text
   --------------------------
    JMSType:          null
    JMSDeliveryMode:  2
    JMSExpiration:    0
    JMSPriority:      4
    JMSMessageID:     ID:414d5120514458362020202020202020cc070d53025e4d22
    JMSTimestamp:     1394803436074
    JMSCorrelationID: null
    JMSDestination:   queue:///XX.MY.ERR.QUEUE
    JMSReplyTo:       null
    JMSRedelivered:   false
      JMSXAppID: WebSphere MQ Client for Java
      JMSXDeliveryCount: 1
      JMSXUserID: b8320      
      JMS_IBM_Character_Set: UTF-8
      JMS_IBM_Encoding: 273
      JMS_IBM_Format: MQSTR  
      JMS_IBM_MsgType: 8
      JMS_IBM_PutApplType: 28
      JMS_IBM_PutDate: 20140314
      JMS_IBM_PutTime: 13235615
  Testing sending message to error queue 
  </code></pre>
  
  <p>Thank you for any help</p>