[jboss-user] [Javassist Development] New message: "Re: Problems with proxy classes and a proposed resolution"

Andrew Dinn do-not-reply at jboss.com
Tue Mar 16 14:41:24 EDT 2010


User development,

A new message was posted in the thread "Problems with proxy classes and a proposed resolution":

http://community.jboss.org/message/532341#532341

Author  : Andrew Dinn
Profile : http://community.jboss.org/people/adinn

Message:
--------------------------------------------------------------
Thanks for the feedback, David.
 

> my intent when I suggested subclassing OOS/OIS was that the read/writeClassDescriptor methods would be overridden such that javassist proxies are treated specially (similar to how reflection proxies are currently treated specially).

 

That's precisely what my prototype implementation does (your comments in JASSIST-42 were all the recipe I needed). It seemed to work ok so once I fixed writeClassDescriptor to return a class with the correct name. This allowed the writer and reader to use normal object serialization to write/read the proxy instance itself.
 
 
> Incidentally, it is possible that a writeReplace serialized proxy object could still be a viable solution.  It would just have to be able to encapsulate the entire object state (basically reproducing the serialization spec behavior of OOS and OIS in terms of creating instances via the proprietary Sun API, initializing fields, dealing with read/writeObject, etc.).
 
Well, yes that's maybe so but I would not like to have to write and maintain code to do that. Your subclassed OOS/OIS solution achieves the same result with just a few calls to methods of OOS/OIS. That''s a big plus for your solution. My reasons for retaining the writeReplace version were i) retaining compatibility and ii) providing an option for code which has to use an OOS/OIS created by some other package rather than create its own subclass of OOS.This discussion is a way of polling to see how important these criteria are.
 
regards,
 
 
Andrew Dinn

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/532341#532341




More information about the jboss-user mailing list