activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brodyc <>
Subject Use of ObjectMessageSerializationDefered
Date Fri, 27 Oct 2006 20:10:01 GMT

Is there a way to send a message that contains an object which does not
implement Serializable when using integrated broker (

I read this on ActiveMQ website:

"Disabling Object serialization with ObjectMessage for ActiveMQ 4.x
The JMS specification dictates that the body of an ObjectMessage must be
serialized when you call send() to avoid the object changing under your feet
affecting what view the consumer sees of the object.

You can disable the automatic serialization of ObjectMessage payloads so
that the objects are passed by value in 4.x by setting the
objectMessageSerializationDefered flag to true on the
ActiveMQConnectionFactory (or ActiveMQConnection)."

I thought that I could wrap my non-serializable object in a Serializable
envelope object and pass it on. Perhaps I am just naive to expect it to work
but the documentation led me to believe that this may be possible. When I
try this approach I get

I use ActiveMQ 4.0.1 and Spring. My spring xml defines the factory as

<bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
        <property name="brokerURL"

Thanks, jc

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message