activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BennyAR <>
Subject ObjectMessage and sharing Class between client and server
Date Mon, 22 Mar 2010 12:12:20 GMT

Perhaps I've missed something, but I cannot find any documentation on how to
successfully send a custom object (some simple POJO) between a client and
server using an ActiveMQ broker. 

They are not running in the same JVM, so how do you cast the object without
Caught:javax.jms.JMSException: Failed to build body from content.
Serializable class not available to broker. Reason:
java.lang.ClassNotFoundException: com.blah.test.MyObj

i.e. both the sender and receiver must know about the the POJO class

Is there a way to add classes to the broker classpath? Or do I add a jar
file containing the POJO in the lib folder of activemq? Or do I need to use
Spring or Camel to create some kind of application context?
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message