You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2010/09/08 13:26:42 UTC

[jira] Resolved: (AMQ-2622) ObjectMessage is [still] being serialized and de-serialized when using setObjectMessageSerializationDefered and setCopyMessageOnSend in local vm:// scenario

     [ https://issues.apache.org/activemq/browse/AMQ-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-2622.
-----------------------------

    Fix Version/s: 5.4.1
                       (was: 5.4.0)
       Resolution: Fixed

resolved in r994990

the issue of ordering disappears as each consumer gets its own copy, so an objects write operation will be called but reads will happen in unserialised copies. The serialisation is now called before marshalling which will only be invoked for non vm transports. 

> ObjectMessage is [still] being serialized and de-serialized when using setObjectMessageSerializationDefered and setCopyMessageOnSend in local vm:// scenario
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2622
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2622
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.3.0
>         Environment: 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)
>            Reporter: Bob DeRemer
>            Assignee: Gary Tully
>             Fix For: 5.4.1
>
>         Attachments: unit-test.txt
>
>
> I have outlined the problem in the following forum link: 
> http://old.nabble.com/URGENT-QUESTION:-AMQ-5.3.0-bug-or-configuration-error------ObjectMessage-is--still--being-serialized-when-using-setObjectMessageSerializationDefered-and-setCopyMessageOnSend-td27654579.html
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.