[jboss-dev-forums] [Design of JBoss Serialization] - Re: resolveClass and annotateClass

Glooper do-not-reply at jboss.com
Fri Jan 19 14:50:22 EST 2007


We write a container and as such have different classloaders throughout the system for the various the applications. To perform HA we sometimes replicate state across many applications... this is done by serializing the object hierarchy... but different objects in this hierarchy can have come from different applications and thus may have different ClassLoaders.
We currently annote information about the classloader in the annotateClass and annotateProxyClass methods by writing the classloader information as a String on the stream... thus when resolveClass or resolveProxyClass is called we can read the classloader information from the stream and use it to lookup the relevant class loader to load the class.

I hope that makes sense! :)

Ben
  

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

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



More information about the jboss-dev-forums mailing list