What is the use of BytesMessage?
Answer / munnu
BytesMessage contains an array of primitive bytes in it's payload. Thus it can be used for transfer of data between two applications in their native format which may not be compatible with other Message types. It is also useful where JMS is used purely as a transport between two systems and the message payload is opaque to the JMS client. Whenever you store any primitive type, it is converted into it's byte representation and then stored in the payload. There is no boundary line between the different data types stored. Thus you can even read a long as short. This would result in erroneous data and hence it is advisable that the payload be read in the same order and using the same type in which it was created by the sender.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is ibm mq jms compliant?
How does spring jms listener work?
Explain about message listeners?
Give an example of using point to point model in JMS?
Can a jms queue have multiple listeners?
What are the main component in JMS?
What are Native Clients ?
Are foreign destinations handled within foreign jms messages?
Why is my jms work not part of a user transaction (i.e., Called within a transaction but not rolled back appropriately)? How do I track down transaction problems?
How many types of messaging model do JMS provide for and what are they?
Give an example of using the point-to-point model
What is jndi? How is it related to jms?