-
1. Re: resolveClass and annotateClass
clebert.suconic Jan 9, 2007 5:25 PM (in response to glooper)I will verify about the annotateClass calls.
Sorry about the delay answering this... I got messed up with my mail box.. didn't see the notification. -
2. Re: resolveClass and annotateClass
glooper Jan 10, 2007 5:25 AM (in response to glooper)Thankyou... I will look forward to your findings.
Ben -
3. Re: resolveClass and annotateClass
glooper Jan 19, 2007 2:22 PM (in response to glooper)I had a few hours today to have a look at this so was examining your code to see how I would solve my problem. Please correct me if I'm wrong!
I can't see how you could ever call annotateClass as class information is persisted on the stream seperately to the objects. You are using the ClassMetaData class to describe a class, and you persisting that information using the StreamingClass class.
I'm guessing that to change jboss serialization such that different class loaders can be used for different serialized objects, I would have to include the relevant information within the ClassMetaData... and change StreamingClass such that it can store the classloader information in saveStream and read the class loader information at the beginning of the readStream method. Does this make sense?
Ben -
4. Re: resolveClass and annotateClass
clebert.suconic Jan 19, 2007 2:30 PM (in response to glooper)Would you happen to have an usecase for where annotateClass/annotateProxyClass would be useful?
A testcase would be even better.
I will have to change where I'm writing the classNames, probably using some delegation to JBossObjectInputStream/JBossObjectOutputStream. I will have to take a look. -
5. Re: resolveClass and annotateClass
clebert.suconic Jan 19, 2007 2:31 PM (in response to glooper)I will have
I mean... we... case you want to contribute a fix. -
6. Re: resolveClass and annotateClass
glooper Jan 19, 2007 2:50 PM (in response to glooper)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