What is the use of BytesMessage?



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

Post New Answer

More JMS Interview Questions

Explain Reliability Mechanisms in JMS?

0 Answers  


What is the diffrence between Java Mail and JMS Queue?

1 Answers  


What is the difference between pub/sub and Point to Point i.e. p2p. ?

1 Answers  


Can jms be used to send an email?

0 Answers  


What is Connection factory?

1 Answers  






How to create an ejb session in order to start a jms connection?

0 Answers  


What is Producer and Consumer?

1 Answers  


What is a message in software?

0 Answers  


How jndi is related to jms?

0 Answers  


Why do the TopicSession.createDurableSubscriber and TopicSession.unubscribe calls raise JMSException with the message "ORA - 4020 - deadlock detected while trying to lock object"?

1 Answers  


What is the use of jms? In which situations we are using jms?

0 Answers  


What is queue connection factory?

0 Answers  


Categories