Answer Posted / 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 |
Post New Answer View All Answers
Explain about message selector?
What is jms message queue?
What is jms destination?
Explain how does the JMS work with the J2EE?
What is jms jndi?
What is a remote jms provider?
What is message listener container?
What is the difference between JMS and RPC (Remote Procedure Call)?
What is the jms client?
What is the important part of JMS applications?
What is a jms session?
How can third-party jdbc driver be used with jms?
What is a jms server?
Can we have more than one consumer for a jms queue?
What is the number of messaging models available on jms?