About the Codec class, I use an adapted version of the HawtDBCamelCodec to
(un)marshall the exchanges to and from byte arrays. It uses a simple
ObjectInputStream to decode the objects.

However, as in Camel-3120 the aggregator bundle should have a
<DynamicImport-Package>*<DynamicImport-Package>. This permits to decode
object from classes exposed by other bundle in the OSGI runtime.

Even with that I had an issue with some JMS headers added to the exchanges.
I had to use the ClassLoadingAwareObjectInputStream from ActiveMQ
(http://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java)
to avoid the ClassNotFoundException.

As I understand, the class uses a different a simple ObjectInputStream but
not with the current classloader.
It is replaced by the current thread ContextClassLoader. But I don't know
where that classloader is set.

Any ideas ?

Thanks
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregator-Persistence-tp2800301p3286263.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to