[
http://jira.jboss.com/jira/browse/JBMESSAGING-1386?page=comments#action_1... ]
Clebert Suconic commented on JBMESSAGING-1386:
----------------------------------------------
That's not a regression...
We aways cache the PayLoad on Objectmessages. The message will be de-serialized on the
first time the Message was received and never more.
According to the API Javadoc, the ObjectMessage should aways store a *snapshot* of the
original object set on setObject.
As we are caching it, we are breaking it.
My suggestion is to aways read the pay load on getObject() on ObjectMessage, aways
returning a new Object. This is not on the main execution path and I don't think it
needs to be optimized.
MethodDeatils:
setObject
public void setObject(java.io.Serializable object)
throws JMSException
Set the serializable object containing this message's data. It is important to
note that an ObjectMessage contains a snapshot of the object at the time setObject() is
called - subsequent modifications of the object will have no affect on the ObjectMessage
body.
Two different topic subscribers in two different sessions get the
same reference to an Object. The object should be serialized.
--------------------------------------------------------------------------------------------------------------------------------
Key: JBMESSAGING-1386
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-1386
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.4.0.SP3.CP02
Reporter: Jay Howell
Assigned To: Tim Fox
Attachments: ObjectSerializationMessageDeliveryTest.java
This seems to be a regression to an issue we had earlier in 1.2. Users can have two
different subscribers and get the same reference to the same object in the same JVM. Test
is attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira