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
Mention different types of messages available in JMS API?
What is the principle difference between the working mechanism of jms and rpc?
What is queue connection factory?
What is jms testing?
How does jms listener work?
What are the functionalities of a jms provider?
What is jms active mq?
Why does jmssession.createtopic or jmssession.createqueue fail to create a destination in wls jms 6.1 (it worked in 5.1)?
In which situations we are using jms?
Explain the process of Configuring Queues in Jms?
Explain the creation of JMS Administered objects?
What is jms correlation id?
What is jms queue?
Is jms a message broker?
Name the components of jms.