geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1072588 - in /geronimo/yoko/trunk: yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/PortableRemoteObjectImpl.java yoko-rmi-spec/src/main/java/javax/rmi/PortableRemoteObject.java
Date Sun, 20 Feb 2011 13:03:58 GMT
Author: xiaming
Date: Sun Feb 20 13:03:58 2011
New Revision: 1072588

URL: http://svn.apache.org/viewvc?rev=1072588&view=rev
Log:
YOKO-431 Update PortableRemoteObject classloading to OSGi way, but StubInitializer has some
problem

Modified:
    geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/PortableRemoteObjectImpl.java
    geronimo/yoko/trunk/yoko-rmi-spec/src/main/java/javax/rmi/PortableRemoteObject.java

Modified: geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/PortableRemoteObjectImpl.java
URL: http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/PortableRemoteObjectImpl.java?rev=1072588&r1=1072587&r2=1072588&view=diff
==============================================================================
--- geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/PortableRemoteObjectImpl.java
(original)
+++ geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/PortableRemoteObjectImpl.java
Sun Feb 20 13:03:58 2011
@@ -36,6 +36,7 @@ import org.apache.yoko.rmi.util.GetSyste
 import org.apache.yoko.rmi.util.stub.MethodRef;
 import org.apache.yoko.rmi.util.stub.StubClass;
 import org.apache.yoko.rmi.util.stub.StubInitializer;
+import org.apache.yoko.rmispec.util.UtilLoader;
 import org.omg.CORBA.BAD_INV_ORDER;
 import org.omg.CORBA.portable.ObjectImpl;
 
@@ -565,7 +566,7 @@ public class PortableRemoteObjectImpl im
         if (initializer == null) {
             String factory = (String)AccessController.doPrivileged(new GetSystemPropertyAction("org.apache.yoko.rmi.RMIStubInitializerClass",
defaultInitializer));
             try {
-                initializer  = (StubInitializer)(Util.loadClass(factory, null, null).newInstance());
+                initializer = (StubInitializer)(UtilLoader.loadServiceClass(factory, "org.apache.yoko.rmi.RMIStubInitializerClass").newInstance());
             } catch (Exception e) {
                 throw (org.omg.CORBA.INITIALIZE)new org.omg.CORBA.INITIALIZE(
                     "Can not create RMIStubInitializer: " + factory).initCause(e);

Modified: geronimo/yoko/trunk/yoko-rmi-spec/src/main/java/javax/rmi/PortableRemoteObject.java
URL: http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-spec/src/main/java/javax/rmi/PortableRemoteObject.java?rev=1072588&r1=1072587&r2=1072588&view=diff
==============================================================================
--- geronimo/yoko/trunk/yoko-rmi-spec/src/main/java/javax/rmi/PortableRemoteObject.java (original)
+++ geronimo/yoko/trunk/yoko-rmi-spec/src/main/java/javax/rmi/PortableRemoteObject.java Sun
Feb 20 13:03:58 2011
@@ -23,18 +23,21 @@ import java.rmi.NoSuchObjectException;
 import java.security.AccessController;
 import javax.rmi.CORBA.PortableRemoteObjectDelegate;
 import javax.rmi.CORBA.Util;
+import javax.rmi.CORBA.UtilDelegate;
 
 import org.apache.yoko.rmispec.util.GetSystemPropertyAction;
+import org.apache.yoko.rmispec.util.UtilLoader;
 
 public class PortableRemoteObject {
     private static PortableRemoteObjectDelegate delegate = null;
     private static final String defaultDelegate = "org.apache.yoko.rmi.impl.PortableRemoteObjectImpl";
+    private static final String DELEGATEKEY = "javax.rmi.CORBA.PortableRemoteObjectClass";
 
     static {
         // Initialize delegate
-        String delegateName = (String)AccessController.doPrivileged(new GetSystemPropertyAction("javax.rmi.CORBA.PortableRemoteObjectClass",
defaultDelegate));
+        String delegateName = (String)AccessController.doPrivileged(new GetSystemPropertyAction(DELEGATEKEY,
defaultDelegate));
         try {
-            delegate = (PortableRemoteObjectDelegate)Util.loadClass(delegateName, null, null).newInstance();
+        	delegate = (PortableRemoteObjectDelegate)UtilLoader.loadServiceClass(delegateName,
DELEGATEKEY).newInstance();
         } catch (Throwable e) {
            org.omg.CORBA.INITIALIZE ex = new org.omg.CORBA.INITIALIZE("Can not create PortableRemoteObject
delegate: "+delegateName);
            ex.initCause(e); 



Mime
View raw message