Lookup for delegate class settings for javax.rmi.CORBA.Util, 
javax.rmi.CORBA.Stub and javax.rmi.PortableRemoteObject don't look in 
orb.properties
-------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: YOKO-429
                 URL: https://issues.apache.org/jira/browse/YOKO-429
             Project: Yoko - CORBA Server
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: RMI-IIOP
         Environment: This problem is current in revision (771721) of the 
rmi-spec code at http://svn.apache.org/repos/asf/incubator/yoko/trunk/rmi-spec
            Reporter: Neil Richards


Currently, the delegation mechanism in:

javax.rmi.CORBA.Util
javax.rmi.CORBA.Stub
javax.rmi.PortableRemoteObject

look for the following property settings:

javax.rmi.CORBA.UtilClass
javax.rmi.CORBA.StubClass
javax.rmi.CORBA.PortableRemoteObjectClass

only in the Java system properties.


However, the OMG Java to IDL specification states that these property settings 
should also be looked for in the orb.properties file (if they are not found in 
the system properties).
[Java to IDL minimum spec (00-01-06), section 1.5.3.4, page 1-55]
[Java to IDL current spec (08-01-14), section 4.5.3.4, pages 58,59]:
------
Delegation Mechanism

Alternate implementations of the standard API classes are enabled by setting 
system
properties or placing entries in the orb.properties file. The names of the new 
system
properties are:

javax.rmi.CORBA.StubClass
javax.rmi.CORBA.UtilClass
javax.rmi.CORBA.PortableRemoteObjectClass

For security reasons, each replaceable API class reads its implementation 
delegate
class system property at static initialization time and uses this information 
to set up
implementation delegation if this has been specified. The delegation 
arrangement thus
established cannot be changed subsequently. The search order for implementation
delegate class names is:

1. The system properties
2. The orb.properties file

For each implementation delegate class, an instance is created using the
Class.newInstance() method. For the Util and PortableRemoteObject
delegate classes, this is a singleton instance. For the Stub delegate class, 
there is one
delegate instance per stub object. The methods in the standard API classes test 
if a
delegate instance exists and if so, forward the method call on to the delegate 
instance.
------

For reference, the location of the orb.properties file is defined in the OMG 
IDL to Java specification.
[IDL to Java minimum spec (00-11-03), section 1.21.8.2, pages 1-131,1-132]
[IDL to Java current spec (08-01-11), section 4.21.9.2, page 135]:
------
orb.properties file

The orb.properties file is an optional file. The search order for the file is:

1.The user's home directory, given by the user.home system property.
2.The <java-home>/lib directory, where <java-home> is the value of the System 
property java.home.

It consists of lines of the form <property-name>=<property-value>.

See Table 4.3 for a list of the property names and values that are recognized 
by ORB.init. Any property names not in this
list shall be ignored by ORB.init(). The file may also contain blank lines and 
comment lines (starting with #), which
are ignored.
------

NB: The OMG IDL to Java specification states that only these property settings 
are honored by ORB.init():

org.omg.CORBA.ORBClass
org.omg.CORBA.ORBSingletonClass

However, the honoring of the three (other) property settings are not performed 
in ORB.init(), but rather in the static initialization of
javax.rmi.CORBA.Util, javax.rmi.CORBA.Stub and javax.rmi.PortableRemoteObject.


Therefore, the static initialization in these three classes should be modified 
to conform to the OMG specifications, as detailed above.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to