JBoss Remoting SVN: r3775 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 01:27:26 -0400 (Wed, 26 Mar 2008)
New Revision: 3775
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
Log:
JBREM-934: Put Class.getMethod() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-03-26 05:26:59 UTC (rev 3774)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/coyote/CoyoteInvoker.java 2008-03-26 05:27:26 UTC (rev 3775)
@@ -52,6 +52,9 @@
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
@@ -111,13 +114,28 @@
boolean apr = false;
try
{
- String methodName = "initialize";
- Class paramTypes[] = new Class[1];
+ final String methodName = "initialize";
+ final Class paramTypes[] = new Class[1];
paramTypes[0] = String.class;
Object paramValues[] = new Object[1];
paramValues[0] = null;
- Method method = Class.forName("org.apache.tomcat.jni.Library")
- .getMethod(methodName, paramTypes);
+ Method method = null;
+
+ try
+ {
+ method = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return Class.forName("org.apache.tomcat.jni.Library").getMethod(methodName, paramTypes);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
+
method.invoke(null, paramValues);
apr = true;
}
16 years, 9 months
JBoss Remoting SVN: r3774 - remoting2/branches/2.x/src/main/org/jboss/remoting/security.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 01:26:59 -0400 (Wed, 26 Mar 2008)
New Revision: 3774
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/security/SSLSocketBuilder.java
Log:
JBREM-934: Put Class.getMethod() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/security/SSLSocketBuilder.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/security/SSLSocketBuilder.java 2008-03-26 05:26:30 UTC (rev 3773)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/security/SSLSocketBuilder.java 2008-03-26 05:26:59 UTC (rev 3774)
@@ -49,6 +49,8 @@
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.security.Provider;
import java.security.SecureRandom;
import java.security.UnrecoverableKeyException;
@@ -399,8 +401,24 @@
{
try
{
- Class sfClass = ClassLoaderUtility.loadClass(defaultFactoryName, SSLSocketBuilder.class);
- Method m = sfClass.getMethod("getDefault", null);
+ final Class sfClass = ClassLoaderUtility.loadClass(defaultFactoryName, SSLSocketBuilder.class);
+ Method m =null;
+
+ try
+ {
+ m = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return sfClass.getMethod("getDefault", null);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
+
if (m == null)
{
throw new RuntimeException(
16 years, 9 months
JBoss Remoting SVN: r3773 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 01:26:30 -0400 (Wed, 26 Mar 2008)
New Revision: 3773
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerRegistry.java
Log:
JBREM-934: Put Class.getMethod() in AccessController.doPrivileged() calls.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerRegistry.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerRegistry.java 2008-03-26 05:06:06 UTC (rev 3772)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/InvokerRegistry.java 2008-03-26 05:26:30 UTC (rev 3773)
@@ -32,6 +32,9 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -415,7 +418,24 @@
if(transportFactoryClass != null)
{
ClientFactory transportFactory = (ClientFactory)transportFactoryClass.newInstance();
- Method getClientInvokerMethod = transportFactoryClass.getMethod("createClientInvoker", new Class[] {InvokerLocator.class, Map.class});
+ Method getClientInvokerMethod = null;
+
+ try
+ {
+ final Class finalClass = transportFactoryClass;
+ getClientInvokerMethod = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return finalClass.getMethod("createClientInvoker", new Class[] {InvokerLocator.class, Map.class});
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
+
clientInvoker = (ClientInvoker)getClientInvokerMethod.invoke(transportFactory, new Object[] {locator, configuration});
}
else
@@ -434,8 +454,25 @@
if(transportFactoryClass != null)
{
ServerFactory transportFactory = (ServerFactory)transportFactoryClass.newInstance();
- Method getClientInvokerMethod = transportFactoryClass.getMethod("createServerInvoker", new Class[] {InvokerLocator.class, Map.class});
- serverInvoker = (ServerInvoker)getClientInvokerMethod.invoke(transportFactory, new Object[] {locator, configuration});
+ Method getServerInvokerMethod = null;
+
+ try
+ {
+ final Class finalClass = transportFactoryClass;
+ getServerInvokerMethod = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return finalClass.getMethod("createServerInvoker", new Class[] {InvokerLocator.class, Map.class});
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
+
+ serverInvoker = (ServerInvoker)getServerInvokerMethod.invoke(transportFactory, new Object[] {locator, configuration});
}
else
{
@@ -636,7 +673,24 @@
{
transportFactoryClass = getTransportClientFactory(transport);
ClientFactory clientFactory = (ClientFactory)transportFactoryClass.newInstance();
- Method meth = transportFactoryClass.getMethod("supportsSSL", new Class[]{});
+ Method meth = null;
+
+ try
+ {
+ final Class finalClass = transportFactoryClass;
+ meth = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return finalClass.getMethod("supportsSSL", new Class[]{});
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
+
Boolean boolVal = (Boolean)meth.invoke(clientFactory, null);
isSSLSupported = boolVal.booleanValue();
}
16 years, 9 months
JBoss Remoting SVN: r3772 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 01:06:06 -0400 (Wed, 26 Mar 2008)
New Revision: 3772
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
Log:
JBREM-934: Put Class.getMethod() (second one) in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26 05:03:07 UTC (rev 3771)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26 05:06:06 UTC (rev 3772)
@@ -598,10 +598,23 @@
{
throw (Exception) e.getCause();
}
+ setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
+ try
+ {
+ setTimeoutMethod = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return conn.getClass().getMethod("setReadTimeout", new Class[]{int.class});
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
- setTimeoutMethod = conn.getClass().getMethod("setReadTimeout", new Class[]{int.class});
- setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
return -1;
}
catch (NoSuchMethodException e)
16 years, 9 months
JBoss Remoting SVN: r3771 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 01:03:07 -0400 (Wed, 26 Mar 2008)
New Revision: 3771
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
Log:
JBREM-934: Put Class.getMethod() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26 04:36:21 UTC (rev 3770)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java 2008-03-26 05:03:07 UTC (rev 3771)
@@ -32,6 +32,7 @@
import org.jboss.remoting.RemoteClientInvoker;
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.Version;
+import org.jboss.remoting.loading.ClassByteClassLoader;
import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.remoting.marshal.Marshaller;
import org.jboss.remoting.marshal.UnMarshaller;
@@ -62,6 +63,9 @@
import java.net.SocketAddress;
import java.net.SocketTimeoutException;
import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -539,7 +543,7 @@
}
- private int getSimulatedTimeout(Map configuration, Map metadata, HttpURLConnection conn)
+ private int getSimulatedTimeout(Map configuration, Map metadata, final HttpURLConnection conn)
{
int timeout = -1;
String connectionTimeout = (String) configuration.get("timeout");
@@ -579,7 +583,22 @@
*/
try
{
- Method setTimeoutMethod = conn.getClass().getMethod("setConnectTimeout", new Class[]{int.class});
+ Method setTimeoutMethod = null;
+ try
+ {
+ setTimeoutMethod = (Method)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return conn.getClass().getMethod("setConnectTimeout", new Class[]{int.class});
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (Exception) e.getCause();
+ }
+
setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
setTimeoutMethod = conn.getClass().getMethod("setReadTimeout", new Class[]{int.class});
setTimeoutMethod.invoke(conn, new Object[]{new Integer(timeout)});
@@ -599,6 +618,12 @@
log.error("Error setting http client connection timeout.");
log.debug(e);
}
+ catch (Exception e)
+ {
+ // Unexpected.
+ log.error("Unexpected error setting http client connection timeout.");
+ log.debug(e);
+ }
return timeout;
}
16 years, 9 months
JBoss Remoting SVN: r3770 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:36:21 -0400 (Wed, 26 Mar 2008)
New Revision: 3770
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java
Log:
JBREM-934: Put Boolean.getBoolean() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java 2008-03-26 04:35:00 UTC (rev 3769)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java 2008-03-26 04:36:21 UTC (rev 3770)
@@ -30,16 +30,18 @@
import org.jboss.remoting.security.SSLSocketBuilderMBean;
import org.jboss.remoting.socketfactory.SocketFactoryWrapper;
import org.jboss.remoting.transport.http.HTTPClientInvoker;
-
import javax.net.SocketFactory;
import javax.net.ssl.HandshakeCompletedListener;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
+
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.net.HttpURLConnection;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.Map;
/**
@@ -178,8 +180,16 @@
// If we still don't have a HostnameVerifier, look for directive to ignore host name.
if (hostnameVerifier == null)
- {
- boolean ignoreHTTPSHost = Boolean.getBoolean(IGNORE_HTTPS_HOST);
+ {
+ Boolean b = (Boolean) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return new Boolean(Boolean.getBoolean(IGNORE_HTTPS_HOST));
+ }
+ });
+
+ boolean ignoreHTTPSHost = b.booleanValue();
String ignoreHost = (String) metadata.get(IGNORE_HTTPS_HOST);
if (ignoreHost != null && ignoreHost.length() > 0)
{
16 years, 9 months
JBoss Remoting SVN: r3769 - remoting2/branches/2.x/src/main/org/jboss/remoting/stream.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:35:00 -0400 (Wed, 26 Mar 2008)
New Revision: 3769
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/stream/StreamServer.java
Log:
JBREM-934: Put System.getProperty() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/stream/StreamServer.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/stream/StreamServer.java 2008-03-26 04:34:20 UTC (rev 3768)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/stream/StreamServer.java 2008-03-26 04:35:00 UTC (rev 3769)
@@ -36,6 +36,8 @@
import java.io.InputStream;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
/**
* This is a helper class that runs internal to remoting on the
@@ -113,9 +115,23 @@
private String getLocatorURI() throws IOException
{
// check for system properties for locator values
- transport = System.getProperty(STREAM_TRANSPORT_KEY, transport);
try
{
+ transport = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty(STREAM_TRANSPORT_KEY, transport);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.debug("error", e.getCause());
+ }
+
+ try
+ {
host = InetAddress.getLocalHost().getHostName();
}
catch(UnknownHostException e)
@@ -129,11 +145,42 @@
log.error("Stream server could not determine local host or address.");
}
}
- host = System.getProperty(STREAM_HOST_KEY, host);
+
+ try
+ {
+ host = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty(STREAM_HOST_KEY, host);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.debug("error", e.getCause());
+ }
+
- String sPort = System.getProperty(STREAM_PORT_KEY, "" + PortUtil.findFreePort(host));
+ String sPort = null;
try
{
+ sPort = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty(STREAM_PORT_KEY, "" + PortUtil.findFreePort(host));
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.debug("error", e.getCause());
+ }
+
+
+ try
+ {
port = Integer.parseInt(sPort);
}
catch(NumberFormatException e)
16 years, 9 months
JBoss Remoting SVN: r3768 - remoting2/branches/2.x/src/main/org/jboss/remoting/serialization.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:34:20 -0400 (Wed, 26 Mar 2008)
New Revision: 3768
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java
Log:
JBREM-934: Put System.getProperty() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java 2008-03-26 04:33:26 UTC (rev 3767)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/serialization/SerializationStreamFactory.java 2008-03-26 04:34:20 UTC (rev 3768)
@@ -28,6 +28,8 @@
import org.jboss.remoting.serialization.impl.jboss.JBossEncryptionSerializationManager;
import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
@@ -56,7 +58,21 @@
{
try
{
- String managerClassName = System.getProperty("SERIALIZATION", JavaSerializationManager.class.getName());
+ String managerClassName = JavaSerializationManager.class.getName();
+ try
+ {
+ managerClassName = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty("SERIALIZATION", JavaSerializationManager.class.getName());
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.debug("error", e.getCause());
+ }
setManagerClassName(DEFAULT, managerClassName);
}
catch(Exception e)
16 years, 9 months
JBoss Remoting SVN: r3767 - remoting2/branches/2.x/src/main/org/jboss/remoting/loading.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:33:26 -0400 (Wed, 26 Mar 2008)
New Revision: 3767
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java
Log:
JBREM-934: Put Boolean.getBoolean() and Integer.getInteger() in AccessController.doPrivileged() calls.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java 2008-03-26 04:31:59 UTC (rev 3766)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java 2008-03-26 04:33:26 UTC (rev 3767)
@@ -23,6 +23,8 @@
import java.io.Externalizable;
import java.io.StreamCorruptedException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
/**
@@ -36,8 +38,24 @@
{
static final long serialVersionUID = 5984363018051268886L;
- private static final int MIN_COMPRESS = Integer.parseInt(System.getProperty("jboss.remoting.compression.min", "1000"));
- private static final boolean DEBUG = Boolean.getBoolean("jboss.remoting.compression.debug");
+ private static final boolean DEBUG =
+ ((Boolean) AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return new Boolean(Boolean.getBoolean("jboss.remoting.compression.debug"));
+ }
+ })).booleanValue();
+
+ private static final int MIN_COMPRESS =
+ ((Integer)AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return Integer.getInteger("jboss.remoting.compression.min", 1000);
+ }
+ })).intValue();
+
private int compressionLevel;
private int compressedSize;
private int originalSize;
16 years, 9 months
JBoss Remoting SVN: r3766 - remoting2/branches/2.x/src/main/org/jboss/remoting/ident.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-26 00:31:59 -0400 (Wed, 26 Mar 2008)
New Revision: 3766
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java
Log:
JBREM-934: Put System.getProperty() in AccessController.doPrivileged() call.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java 2008-03-26 04:30:55 UTC (rev 3765)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java 2008-03-26 04:31:59 UTC (rev 3766)
@@ -21,7 +21,6 @@
*/
package org.jboss.remoting.ident;
-import org.jboss.remoting.loading.ClassByteClassLoader;
import org.jboss.remoting.network.NetworkRegistry;
import javax.management.MBeanServer;
@@ -55,7 +54,26 @@
private static transient Random random = new Random(System.currentTimeMillis());
public static transient String DEFAULT_DOMAIN = "JBOSS";
- private static transient String _domain = System.getProperty("jboss.identity.domain", DEFAULT_DOMAIN);
+ private static transient String _domain = DEFAULT_DOMAIN;
+
+ static
+ {
+ try
+ {
+ _domain = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty("jboss.identity.domain", DEFAULT_DOMAIN);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
private static transient Map identities = new WeakHashMap(2);
private final String instanceid;
@@ -275,7 +293,22 @@
if(file == null)
{
// we may not have that mbean, which is OK
- String fl = System.getProperty("jboss.identity.dir", ".");
+ String fl = ".";
+ try
+ {
+ fl = (String)AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.getProperty("jboss.identity.dir", ".");
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
File dir = new File(fl);
if(dir.exists() == false)
{
16 years, 9 months