tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aman Nanner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENEJB-286) CORBA/RMI delegate code requires delegate implementation to be on the system classpath
Date Mon, 19 Feb 2007 13:54:05 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474172
] 

Aman Nanner commented on OPENEJB-286:
-------------------------------------

Did this fix make it into Geronimo 1.2-beta?  I am seeing this issue in the 1.2-beta version
of Geronimo.

> CORBA/RMI delegate code requires delegate implementation to be on the system classpath
> --------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-286
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-286
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: corba
>            Reporter: Dain Sundstrom
>         Assigned To: Rick McGuire
>         Attachments: OPENEJB-286.patch
>
>
> When the java.rmi.Util class is loaded, it uses Class.forName to load the UtilDelegate
specified in a system property.  This is what yoko uses:
>     private static UtilDelegate delegate = null;
>     private static final String defaultDelegate = "org.apache.yoko.rmi.impl.UtilImpl";
>     static {
>         // Initialize delegate
>         String delegateName = System.getProperty("javax.rmi.CORBA.UtilClass", defaultDelegate);
>         try {
>             delegate = (UtilDelegate)Class.forName(delegateName).newInstance();
>         } catch (Exception e) {
>             throw new RuntimeException("Can not create Util delegate: "+delegateName,
e);
>         }
>     }
> IIRC Class.forName(String) uses the class loader of the class containing the code, and
since java.rmi.Util will always be on the system class path our delegate must be on the system
class path :(
> I see a few choices:
> * change yoko to use the thread context class loader... then add a gbean to set the property
and load the Util class. repeat of every delegate class.
> * write a delegate delegate that allows us to swap out the actual delegate implementation
later
> * split out out delegate class into a jar we can put on the system class path

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


Mime
View raw message