geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kresten Krab Thorup <>
Subject Re: Trifork CORBA
Date Thu, 27 Oct 2005 12:51:12 GMT
On Oct 26, 2005, at 7:39 PM, Matt Hogstrom wrote:

>> Can I ask why portability is critical? Most VM's (with one notable
>> exception) use the Sun ORB so depending on it doesn't seem such a big
>> deal to me, especially if its a necessary evil. I agree support  
>> for J2SE
>> 5.0 is essential, but its pretty easy to write code that supports  
>> both
>> 1.4 and 5.0 ORBs.

There is a single thing in the RMI/IIOP which is difficult to do  
portably, and so the new orb needs to have this as a VM-specific plug  
in mechanism.

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.

Both of the above is something that the given VM's RMI implementaion  
(specifically would need to realize.  So  
to the extend that it is permissible to reverse engineer the  
implementaition of ObjectStreamClass, we can extract what's needed to  
do this.

Apart from this, the ORB can be completely portable.


View raw message