[jboss-dev-forums] [Design of JBossCache] - Re: Common marshalling infrastructure

david.lloyd@jboss.com do-not-reply at jboss.com
Tue Sep 16 09:37:09 EDT 2008


OK so I thought I'd post an update.  The basic framework is "Almost Done (tm)", and so I just want to quickly mention some things that ended up different in the implementation from what was mentioned previously here.

The ability to create object instances is now pluggable via the Creator interface.  I provide two implementations: one that just uses reflection, and one that uses the Sun-specific method to create a constructor if a suitable one does not exist.

Object and Class marshallers are no longer separated.  This looked good on paper but turned out to be totally useless in practice. Instead, there is a notion of ClassResolvers (this is where you plug in your customized classloader configuration), ClassTables (predefined classes by ID), and ObjectTables (predefined objects by ID).

Externalizers now can create object instances, so it's possible to serialize and deserialize an entire payload without using reflection at all.

Finally, I've created some abstract base classes to make it easier to create a marshaller implementation.  Right now we're working on a full-featured "native" implementation, as well as a Java-compatible implementation.  Clebert had mentioned that he should be able to produce a JBSER-compatible implementation as well.

Here's the updated API: http://tinyurl.com/6yme33

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176813#4176813

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176813



More information about the jboss-dev-forums mailing list