have you set:

factory.setObjectMessageSerializationDefered(true);


http://activemq.apache.org/how-should-i-use-the-vm-transport.html

On 16 February 2010 16:49, bob.deremer
<bob.dere...@burningskysoftware.com>wrote:

>
> Hi all ActiveMQ gurus,
>
> BACKGROUND:
> I'm using AMQ 5.3 with the local vm:// transport and wish to make use of
> the
> copyMessageOnSend = FALSE convention to send my messages by reference
> [instead of by value].  Given the dynamic nature of our ObjectMessage-based
> messages and varying size of the message content, we want to avoid any
> unncessary serialization/deserialization whereever possible.  I am
> currently
> setting this property on the producer's ConnectionFactory, so [according to
> the AMQ docs] this should be properly configured.
>
> QUESTION:
> Why does the createObjectMessage(...) throw an exception when I try and
> create an ObjectMessage from my custom object that has sub-objects inside
> of
> it that do NOT implement Serializable?  I can understand the top-level
> object being passed to createObjectMessage requiring Serializable because
> that is how the method is defined.  BUT, if copyMessageOnSend == FALSE is
> being used, why is the whole object chain being checked for Serializable
> [if
> it's not going to be serialized]?  My BIG concern is that some level of
> serialization is being done when it shouldn't be.
>
> Please help me understand what's going on under the hood.  I don't want to
> force all objects going into ActiveMQ to implement Serializable if they
> really aren't going to be serialized.
>
> Thanks in advance for clarification on this,
> Bob
>
> --
> View this message in context:
> http://old.nabble.com/HOW-TO%3A-confirm-copyMessageOnSend-is-working----tp27611334p27611334.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Reply via email to