Can somebody tell me Why the body and properties of a javax.jms.Message
are made read-only after delivery in JMS
spec. Is there any valid reason behind this. Thanks.
I will change the question a bit by reading Peter Lawrey comment. While i was reading one book it was mentioned as below:
> Why are both the body and properties made read-only after delivery? It
> allows the JMS provider more flexibility in implementing the Message
> object. For example, a JMS provider may choose to stream a
> BytesMessage or StreamMessage as it is read, rather than all at once.
> Another vendor may choose to keep properties or body data in an
> internal buffer so that it can be read directly without the need to
> make a copy, which is especially useful with multiple consumers on the
> same client.
here i couldn't understand the last line which says:
which is especially useful with multiple consumers on the same client
what does that means. Thanks in advance.