You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by ri...@apache.org on 2006/10/10 23:41:22 UTC

svn commit: r462639 - /incubator/yoko/trunk/rmi/src/main/java/javax/rmi/PortableRemoteObject.java

Author: rickmcguire
Date: Tue Oct 10 16:41:21 2006
New Revision: 462639

URL: http://svn.apache.org/viewvc?view=rev&rev=462639
Log:
YOKO-189 PortableRemoteObject needs to use the Util delegate class to load the PortableRemoteObjectClass


Modified:
    incubator/yoko/trunk/rmi/src/main/java/javax/rmi/PortableRemoteObject.java

Modified: incubator/yoko/trunk/rmi/src/main/java/javax/rmi/PortableRemoteObject.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/rmi/src/main/java/javax/rmi/PortableRemoteObject.java?view=diff&rev=462639&r1=462638&r2=462639
==============================================================================
--- incubator/yoko/trunk/rmi/src/main/java/javax/rmi/PortableRemoteObject.java (original)
+++ incubator/yoko/trunk/rmi/src/main/java/javax/rmi/PortableRemoteObject.java Tue Oct 10 16:41:21 2006
@@ -20,42 +20,43 @@
 import java.rmi.RemoteException;
 import java.rmi.NoSuchObjectException;
 import javax.rmi.CORBA.PortableRemoteObjectDelegate;
+import javax.rmi.CORBA.Util;
 
 public class PortableRemoteObject {
     private static PortableRemoteObjectDelegate delegate = null;
     private static final String defaultDelegate = "org.apache.yoko.rmi.impl.PortableRemoteObjectImpl";
-    
+
     static {
         // Initialize delegate
         String delegateName = System.getProperty("javax.rmi.CORBA.PortableRemoteObjectClass", defaultDelegate);
         try {
-            delegate = (PortableRemoteObjectDelegate)Class.forName(delegateName).newInstance();
+            delegate = (PortableRemoteObjectDelegate)Util.loadClass(delegateName, null, null).newInstance();
         } catch (Exception e) {
-            throw new RuntimeException("Can not create PortableRemoteObject delegate: "+delegateName, e);
+            throw new org.omg.CORBA.INITIALIZE("Can not create PortableRemoteObject delegate: "+delegateName);
         }
     }
-    
+
     protected PortableRemoteObject() throws RemoteException {
         // Register object
         //exportObject(this);
     }
-    
+
     public static void connect(Remote target, Remote source) throws RemoteException {
         delegate.connect(target, source);
     }
-    
+
     public static void exportObject(Remote o) throws RemoteException {
         delegate.exportObject(o);
     }
-    
+
     public static Object narrow(Object from, Class to) throws ClassCastException {
         return delegate.narrow(from, to);
     }
-    
+
     public static Remote toStub(Remote o) throws NoSuchObjectException {
         return delegate.toStub(o);
     }
-    
+
     public static void unexportObject(Remote o) throws NoSuchObjectException {
         delegate.unexportObject(o);
     }