JBoss Remoting SVN: r3866 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/deadlock.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 01:28:45 -0400 (Wed, 02 Apr 2008)
New Revision: 3866
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/deadlock/MulticastDetectorServer.java
Log:
JBREM-934: Put MBeanServerFactory.createMBeanServer() call in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/deadlock/MulticastDetectorServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/deadlock/MulticastDetectorServer.java 2008-04-02 05:28:26 UTC (rev 3865)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/deadlock/MulticastDetectorServer.java 2008-04-02 05:28:45 UTC (rev 3866)
@@ -19,6 +19,9 @@
import javax.management.ObjectName;
import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
@@ -41,7 +44,22 @@
System.setProperty("jboss.identity", String.valueOf(System.currentTimeMillis()));
System.out.println("jboss.identity = " + System.getProperty("jboss.identity"));
- MBeanServer server = MBeanServerFactory.createMBeanServer();
+ MBeanServer server = null;
+
+ try
+ {
+ server = (MBeanServer) AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return MBeanServerFactory.createMBeanServer();
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
registry = NetworkRegistry.getInstance();
server.registerMBean(registry, new ObjectName("remoting:type=NetworkRegistry"));
16 years, 11 months
JBoss Remoting SVN: r3865 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 01:28:26 -0400 (Wed, 02 Apr 2008)
New Revision: 3865
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/MulticastDetectorTestCase.java
Log:
JBREM-934: Put MBeanServerFactory.createMBeanServer() call in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/MulticastDetectorTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/MulticastDetectorTestCase.java 2008-04-02 05:27:44 UTC (rev 3864)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/multicast/MulticastDetectorTestCase.java 2008-04-02 05:28:26 UTC (rev 3865)
@@ -1,8 +1,11 @@
package org.jboss.test.remoting.detection.multicast;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
import junit.framework.TestCase;
import org.jboss.remoting.detection.multicast.MulticastDetector;
-
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
@@ -20,7 +23,22 @@
protected void setUp() throws Exception
{
super.setUp();
- server = MBeanServerFactory.createMBeanServer();
+
+ try
+ {
+ server = (MBeanServer) AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return MBeanServerFactory.createMBeanServer();
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
+
objectName = new ObjectName("remoting:type=MulticastDetector");
}
16 years, 11 months
JBoss Remoting SVN: r3864 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/metadata.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 01:27:44 -0400 (Wed, 02 Apr 2008)
New Revision: 3864
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/metadata/MetadataTestCase.java
Log:
JBREM-934: Put MBeanServerFactory.findMBeanServer() call in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/metadata/MetadataTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/metadata/MetadataTestCase.java 2008-04-02 04:34:24 UTC (rev 3863)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/metadata/MetadataTestCase.java 2008-04-02 05:27:44 UTC (rev 3864)
@@ -41,6 +41,10 @@
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.ByteArrayInputStream;
import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.List;
/**
@@ -73,7 +77,15 @@
NetworkRegistry reg1 = setupServers(detector1, connector1);
// need to register with the mbean server for notifications
- List mbeanServers = MBeanServerFactory.findMBeanServer(null);
+ List mbeanServers
+ = (List) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return MBeanServerFactory.findMBeanServer(null);
+ }
+ });
+
MBeanServer mbeanSvr = (MBeanServer) mbeanServers.get(0);
mbeanSvr.addNotificationListener(new ObjectName("remoting:type=NetworkRegistry"),
this, null, null);
16 years, 11 months
JBoss Remoting SVN: r3863 - remoting2/branches/2.x/src/main/org/jboss/remoting/util.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 00:34:24 -0400 (Wed, 02 Apr 2008)
New Revision: 3863
Added:
remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java
Log:
JBREM-934: New utility class for making System.getProperty() calls.
Added: remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java (rev 0)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/util/SystemUtility.java 2008-04-02 04:34:24 UTC (rev 3863)
@@ -0,0 +1,79 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.remoting.util;
+
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Mar 31, 2008
+ * </p>
+ */
+public class SystemUtility
+{
+ static public String getSystemProperty(final String name, final String defaultValue)
+ {
+ String value = null;
+ try
+ {
+ value = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty(name, defaultValue);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+
+ return value;
+ }
+
+ static public String getSystemProperty(final String name)
+ {
+ String value = null;
+ try
+ {
+ value = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty(name);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+
+ return value;
+ }
+}
+
16 years, 11 months
JBoss Remoting SVN: r3862 - remoting2/branches/2.x/src/main/org/jboss/remoting/transporter.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 00:33:47 -0400 (Wed, 02 Apr 2008)
New Revision: 3862
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java
Log:
JBREM-934: Put MBeanServerFactory.createMBeanServer() call in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java 2008-04-02 04:33:20 UTC (rev 3861)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterServer.java 2008-04-02 04:33:47 UTC (rev 3862)
@@ -30,6 +30,10 @@
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
+
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -216,7 +220,21 @@
if (!services.isSetup())
{
// we need an MBeanServer to store our network registry and multicast detector services
- MBeanServer server = MBeanServerFactory.createMBeanServer();
+ MBeanServer server = null;
+ try
+ {
+ server = (MBeanServer) AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return MBeanServerFactory.createMBeanServer();
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
// multicast detector will detect new network registries that come online
MulticastDetector detector = new MulticastDetector();
16 years, 11 months
JBoss Remoting SVN: r3861 - remoting2/branches/2.x/src/main/org/jboss/remoting/transporter.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 00:33:20 -0400 (Wed, 02 Apr 2008)
New Revision: 3861
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java
Log:
JBREM-934: Put MBeanServerFactory.createMBeanServer() and Thread().getContextClassLoader() calls in AccessController.doPrivileged() calls.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java 2008-04-02 04:31:59 UTC (rev 3860)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/TransporterClient.java 2008-04-02 04:33:20 UTC (rev 3861)
@@ -39,6 +39,10 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
/**
@@ -131,7 +135,21 @@
if (!services.isSetup())
{
// we need an MBeanServer to store our network registry and multicast detector services
- MBeanServer server = MBeanServerFactory.createMBeanServer();
+ MBeanServer server = null;
+ try
+ {
+ server = (MBeanServer) AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return MBeanServerFactory.createMBeanServer();
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
// multicast detector will detect new network registries that come online
MulticastDetector detector = new MulticastDetector();
@@ -184,8 +202,14 @@
}
InvokerLocator locator = new InvokerLocator(locatorURI);
TransporterClient client = new TransporterClient(locator, targetClass.getName());
- return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
- new Class[]{targetClass}, client);
+ ClassLoader tcl = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ return Proxy.newProxyInstance(tcl, new Class[]{targetClass}, client);
}
}
@@ -206,8 +230,14 @@
}
InvokerLocator locator = new InvokerLocator(locatorURI);
TransporterClient client = new TransporterClient(locator, targetClass.getName(), loadBalancer);
- return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
- new Class[]{targetClass}, client);
+ ClassLoader tcl = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ return Proxy.newProxyInstance(tcl, new Class[]{targetClass}, client);
}
/**
@@ -235,8 +265,14 @@
public static Object createTransporterClient(InvokerLocator locator, Class targetClass) throws Exception
{
TransporterClient client = new TransporterClient(locator, targetClass.getName());
- return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
- new Class[]{targetClass}, client);
+ ClassLoader tcl = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ return Proxy.newProxyInstance(tcl, new Class[]{targetClass}, client);
}
/**
16 years, 11 months
JBoss Remoting SVN: r3860 - remoting2/branches/2.x/src/main/org/jboss/remoting/transporter.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 00:31:59 -0400 (Wed, 02 Apr 2008)
New Revision: 3860
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java
Log:
JBREM-934: Put MBeanServer.registerMBean() calls in AccessController.doPrivileged() calls.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java 2008-04-02 04:31:21 UTC (rev 3859)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/InternalTransporterServices.java 2008-04-02 04:31:59 UTC (rev 3860)
@@ -3,6 +3,10 @@
*/
package org.jboss.remoting.transporter;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
import org.jboss.mx.util.ObjectNameFactory;
import org.jboss.remoting.detection.Detector;
import org.jboss.remoting.network.NetworkRegistry;
@@ -234,8 +238,22 @@
m_detectorName = detectorName;
if (registerDetector)
- {
- m_mBeanServer.registerMBean(m_detector, m_detectorName);
+ {
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ m_mBeanServer.registerMBean(m_detector, m_detectorName);
+ return null;
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
}
}
@@ -294,7 +312,21 @@
if (registerRegistry)
{
- m_mBeanServer.registerMBean(m_networkRegistry, m_networkRegistryName);
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ m_mBeanServer.registerMBean(m_networkRegistry, m_networkRegistryName);
+ return null;
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
}
}
16 years, 11 months
JBoss Remoting SVN: r3859 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 00:31:21 -0400 (Wed, 02 Apr 2008)
New Revision: 3859
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java
Log:
JBREM-934: Put Class.getClassLoader() calls in AccessController.doPrivileged() calls.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java 2008-04-02 04:30:17 UTC (rev 3858)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java 2008-04-02 04:31:21 UTC (rev 3859)
@@ -25,13 +25,13 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.Map;
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.transport.coyote.RequestMap;
-import org.jboss.remoting.transport.coyote.ResponseMap;
import org.jboss.remoting.transport.http.HTTPMetadataConstants;
import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.remoting.marshal.Marshaller;
@@ -99,7 +99,15 @@
public UnMarshaller getUnMarshaller()
{
- UnMarshaller unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), this.getClass().getClassLoader());
+ ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return WebServerInvoker.class.getClassLoader();
+ }
+ });
+
+ UnMarshaller unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), classLoader);
if(unmarshaller == null)
{
unmarshaller = MarshalFactory.getUnMarshaller(getDataType(), getSerializationType());
@@ -109,7 +117,15 @@
public Marshaller getMarshaller()
{
- Marshaller marshaller = MarshalFactory.getMarshaller(getLocator(), this.getClass().getClassLoader());
+ ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return WebServerInvoker.class.getClassLoader();
+ }
+ });
+
+ Marshaller marshaller = MarshalFactory.getMarshaller(getLocator(), classLoader);
if(marshaller == null)
{
16 years, 11 months
JBoss Remoting SVN: r3858 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 00:30:17 -0400 (Wed, 02 Apr 2008)
New Revision: 3858
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
Log:
JBREM-934: Put InetAddress.getByName() call in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2008-04-02 04:29:51 UTC (rev 3857)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2008-04-02 04:30:17 UTC (rev 3858)
@@ -26,7 +26,6 @@
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.util.TimerUtil;
-import org.jboss.remoting.loading.ClassByteClassLoader;
import org.jboss.remoting.marshal.serializable.SerializableMarshaller;
import org.jboss.util.propertyeditor.PropertyEditors;
import org.jboss.logging.Logger;
@@ -41,8 +40,8 @@
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
+import java.net.UnknownHostException;
import java.security.AccessController;
-import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
@@ -343,9 +342,24 @@
while (it.hasNext())
{
Home home = (Home) it.next();
- InetAddress inetAddress = InetAddress.getByName(home.host);
+ InetAddress inetAddress = null;
+ try
+ {
+ final Home finalHome = home;
+ inetAddress = (InetAddress)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws UnknownHostException
+ {
+ return InetAddress.getByName(finalHome.host);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (UnknownHostException) e.getCause();
+ }
+
ServerSocket ss = null;
-
try
{
ss = factory.createServerSocket();
16 years, 11 months
JBoss Remoting SVN: r3857 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-04-02 00:29:51 -0400 (Wed, 02 Apr 2008)
New Revision: 3857
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java
Log:
JBREM-934: Put Class.getClassLoader() calls in AccessController.doPrivileged() calls.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2008-04-02 04:29:01 UTC (rev 3856)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2008-04-02 04:29:51 UTC (rev 3857)
@@ -50,6 +50,8 @@
import java.net.SocketAddress;
import java.net.SocketException;
import java.net.SocketTimeoutException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
@@ -641,7 +643,15 @@
int version)
throws Exception
{
- Object obj = versionedRead(inputStream, invoker, getClass().getClassLoader(), version);
+ ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return ServerThread.class.getClassLoader();
+ }
+ });
+
+ Object obj = versionedRead(inputStream, invoker, classLoader, version);
// setting timestamp since about to start processing
lastRequestHandledTimestamp = System.currentTimeMillis();
@@ -713,7 +723,7 @@
if (isOneway(req))
resp = null;
- versionedWrite(outputStream, invoker, this.getClass().getClassLoader(), resp, version);
+ versionedWrite(outputStream, invoker, classLoader, resp, version);
}
// set the timestamp for last successful processed request
@@ -893,7 +903,15 @@
private void processNewSocket()
{
InvokerLocator locator = invoker.getLocator();
- ClassLoader classLoader = getClass().getClassLoader();
+
+ ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return ServerThread.class.getClassLoader();
+ }
+ });
+
String dataType = invoker.getDataType();
String serializationType = invoker.getSerializationType();
16 years, 11 months