At 01:51 PM 10/27/2005, Kresten Krab Thorup wrote:
One issue is that RMI needs to be able to write the value of a final
instance field (to de-serialize an object) and this is something that
cannot be done with reflection. So for this we are using
com.sun.Unsafe (which is the internal Sun API to implement
reflection).  This is also there in the IBM VMs, but JRockit has
another API to accomplish the same thing.

The other thing is being able to call constructors in the particular
way needed when de-serializing instances of classes that have no
public no-arg constructor.  For this, we generally need to call into
VM-specific private static methods also.

The latest JRockit implements the appropriate parts of Unsafe - I know because I made them put it in so that I could implement the WebLogic ValueHandler on top of it.

But why not just use the VM's ValueHandler? The Sun and IBM one's are both pretty reasonable now.

andy

Reply via email to