[jboss-cvs] JBoss Messaging SVN: r3145 - trunk/src/main/org/jboss/jms/client/remoting.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 27 14:38:07 EDT 2007


Author: clebert.suconic at jboss.com
Date: 2007-09-27 14:38:07 -0400 (Thu, 27 Sep 2007)
New Revision: 3145

Modified:
   trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
Log:
Applying patch provided by Anil

Modified: trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2007-09-27 18:31:57 UTC (rev 3144)
+++ trunk/src/main/org/jboss/jms/client/remoting/JMSRemotingConnection.java	2007-09-27 18:38:07 UTC (rev 3145)
@@ -24,6 +24,9 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.net.MalformedURLException;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
+import java.security.PrivilegedActionException;
 
 import org.jboss.jms.server.ServerPeer;
 import org.jboss.jms.wireformat.JMSWireFormat;
@@ -273,8 +276,17 @@
       if (log.isTraceEnabled()) { log.trace(this + " created client"); }
 
       callbackManager = new CallbackManager();
-      client.connect();
 
+      //Do a privileged Action to connect
+      AccessController.doPrivileged( new PrivilegedExceptionAction()
+      {
+         public Object run() throws Exception
+         {
+            client.connect();
+            return null;
+         }
+      });
+
       // We explicitly set the Marshaller since otherwise remoting tries to resolve the marshaller
       // every time which is very slow - see org.jboss.remoting.transport.socket.ProcessInvocation
       // This can make a massive difference on performance. We also do this in




More information about the jboss-cvs-commits mailing list