Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.3.0
-
None
-
None
-
Windows Server 2008 R2, 64-bit, binary download of ActiveMQ 5.3.0, Java 1.6.0_17 (64-bit), Eclipse 3.5 (64-bit), tomcat 6.0 (64-bit)
Description
I have outlined the problem in the following forum link:
I have not created a JUnit test that demonstrates this, but here are the basic steps to reproduce this:
- create an embedded broker with no persistence, dedicatedTaskRunner = false, and optimizedDispatch = true
- create the ActiveMQConnectionFactory and set the setObjectMessageSerializationDefered = TRUE and setCopyMessageOnSend = FALSE
- create your connection from the factory
- create a producer and [MessageListener] consumer against a Queue
- create your own custom java object that implements Externalizable - this is important, because you will be able to set a breakpoint in the readExternal and writeExternal methods to see the 2 locations on the AMQ code where the message is copied - causing a serialization/de-serialization
- create a new ObjectMessage and send it from the producer to the consumer
The message will get serialized in ActiveMQConnection.java on this line [msg = msg.copy();] - see the linked forum issue for the code snippet and line numbers.
NOTE: you will need to continue stepping the code through the complete dispatch process because it will go through a de-serialization phase as well when the call to getObject is called in the onMessage of the MessageListener.
Please let me know if I can provide any more details - OR, if I'm not setting something properly to keep the ObjectMessage from being serialized.
Thanks,
Bob