[jboss-remoting-commits] JBoss Remoting SVN: r3959 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Fri Apr 11 21:38:26 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-04-11 21:38:26 -0400 (Fri, 11 Apr 2008)
New Revision: 3959

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java
Log:
JBREM-934: Replaced AccessController.doPrivileged() call with SecurityUtility call.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java	2008-04-12 01:26:54 UTC (rev 3958)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/rmi/RMIClientInvoker.java	2008-04-12 01:38:26 UTC (rev 3959)
@@ -42,15 +42,12 @@
 import org.jboss.remoting.marshal.rmi.RMIUnMarshaller;
 import org.jboss.remoting.serialization.SerializationManager;
 import org.jboss.remoting.serialization.SerializationStreamFactory;
-import org.jboss.util.propertyeditor.PropertyEditors;
 import org.jboss.util.threadpool.BasicThreadPool;
 import org.jboss.util.threadpool.BlockingMode;
 import org.jboss.util.threadpool.RunnableTaskWrapper;
 import org.jboss.util.threadpool.Task;
 import org.jboss.util.threadpool.ThreadPool;
 
-import java.beans.IntrospectionException;
-import java.io.BufferedInputStream;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -60,9 +57,6 @@
 import java.rmi.RemoteException;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -236,22 +230,23 @@
             log.debug(this + " trying to connect to: " + home);
             Remote remoteObj = null;
             
-            try
-            {
-               remoteObj = (Remote) AccessController.doPrivileged( new PrivilegedExceptionAction()
-               {
-                  public Object run() throws Exception
-                  {
-                     return registry.lookup("remoting/RMIServerInvoker/" + port);
-                  }
-               });
-            }
-            catch (PrivilegedActionException e)
-            {
-               log.debug(e.toString(), e);
-               throw (Exception) e.getCause();
-            }
+//            try
+//            {
+//               remoteObj = (Remote) AccessController.doPrivileged( new PrivilegedExceptionAction()
+//               {
+//                  public Object run() throws Exception
+//                  {
+//                     return registry.lookup("remoting/RMIServerInvoker/" + port);
+//                  }
+//               });
+//            }
+//            catch (PrivilegedActionException e)
+//            {
+//               log.debug(e.toString(), e);
+//               throw (Exception) e.getCause();
+//            }
             
+            remoteObj = registry.lookup("remoting/RMIServerInvoker/" + port);
             log.debug("Remote RMI Stub: " + remoteObj);
             setServerStub((RMIServerInvokerInf) remoteObj);
             connected = true;




More information about the jboss-remoting-commits mailing list