JBoss Remoting SVN: r3595 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-08 02:35:46 -0500 (Sat, 08 Mar 2008)
New Revision: 3595
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/BisocketCompressionStressTestCase.java
Log:
JBREM-677: Deleting since for this test bisocket is the same as socket.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/BisocketCompressionStressTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/BisocketCompressionStressTestCase.java 2008-03-08 04:17:34 UTC (rev 3594)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/marshall/compress/BisocketCompressionStressTestCase.java 2008-03-08 07:35:46 UTC (rev 3595)
@@ -1,42 +0,0 @@
-/*
-* 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.test.remoting.marshall.compress;
-
-import org.jboss.test.remoting.marshall.compress.CompressionStressTestParent;
-
-/**
- * Unit test for JBREM-677.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Revision: 1.1 $
- * <p>
- * Copyright Mar 6, 2008
- * </p>
- */
-public class BisocketCompressionStressTestCase extends CompressionStressTestParent
-{
- protected String getTransport()
- {
- return "bisocket";
- }
-}
-
15 years, 9 months
JBoss Remoting SVN: r3594 - remoting2/branches/2.x/lib/jgroups/lib.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-07 23:17:34 -0500 (Fri, 07 Mar 2008)
New Revision: 3594
Removed:
remoting2/branches/2.x/lib/jgroups/lib/jgroups.jar
Log:
JBREM-876: Replaced jgroups.jar with jgroups-all.jar
Deleted: remoting2/branches/2.x/lib/jgroups/lib/jgroups.jar
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Remoting SVN: r3593 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-07 19:49:10 -0500 (Fri, 07 Mar 2008)
New Revision: 3593
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java
Log:
JBREM-800: In testBlockingPollApplicationAckDifferentHandlers() extended Thread.sleep() before testing callbacks..
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java 2008-03-08 00:45:48 UTC (rev 3592)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java 2008-03-08 00:49:10 UTC (rev 3593)
@@ -496,7 +496,7 @@
client.addListener(callbackHandler2, metadata);
assertEquals(0, TestInvocationHandler.callbacksAcknowledged);
client.invoke(APPLICATION_ACKNOWLEDGEMENT_TEST);
- Thread.sleep(1000);
+ Thread.sleep(2000);
assertEquals(2, callbackHandler1.callbacksReceived);
assertEquals(2, callbackHandler2.callbacksReceived);
assertEquals(4, TestInvocationHandler.callbacksAcknowledged);
15 years, 9 months
JBoss Remoting SVN: r3592 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/oneway.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-07 19:45:48 -0500 (Fri, 07 Mar 2008)
New Revision: 3592
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/oneway/OnewayConnectionManagerTestCase.java
Log:
JBREM-800: In testHeavyLoadWithoutTimeouts() inserted Thread.sleep() before testing connection pool.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/oneway/OnewayConnectionManagerTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/oneway/OnewayConnectionManagerTestCase.java 2008-03-08 00:42:31 UTC (rev 3591)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/oneway/OnewayConnectionManagerTestCase.java 2008-03-08 00:45:48 UTC (rev 3592)
@@ -544,6 +544,7 @@
assertTrue("failure in thread: " + i, threads[i].ok);
}
+ Thread.sleep(2000);
assertEquals(0, invoker.getNumberOfUsedConnections());
assertEquals(100, pool.size());
15 years, 9 months
JBoss Remoting SVN: r3591 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/ssl/custom.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-03-07 19:42:31 -0500 (Fri, 07 Mar 2008)
New Revision: 3591
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/ssl/custom/SSLBisocketInvokerClientTest.java
Log:
JBREM-800: Extended Thread.sleep() in testCalbacks().
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/ssl/custom/SSLBisocketInvokerClientTest.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/ssl/custom/SSLBisocketInvokerClientTest.java 2008-03-07 17:39:01 UTC (rev 3590)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/ssl/custom/SSLBisocketInvokerClientTest.java 2008-03-08 00:42:31 UTC (rev 3591)
@@ -68,7 +68,7 @@
solicitCallback("abc");
// need to wait for brief moment so server can callback
- Thread.sleep(500);
+ Thread.sleep(1000);
// remove callback handler from server
client.removeListener(callbackHandler);
15 years, 9 months
JBoss Remoting SVN: r3590 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-07 12:39:01 -0500 (Fri, 07 Mar 2008)
New Revision: 3590
Modified:
remoting2/branches/2.x/build.xml
Log:
At the risk of screwing up the test runs - here it is: Add in a security manager to all tests. Also had to bump up the memory allocation for the main test suite since it runs out for me now. Tests *seem* to *mostly* work, so here goes nuthin...
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-03-07 17:37:44 UTC (rev 3589)
+++ remoting2/branches/2.x/build.xml 2008-03-07 17:39:01 UTC (rev 3590)
@@ -29,6 +29,9 @@
<property name="compile.source" value="${ant.java.version}"/>
<property name="compile.target" value="${ant.java.version}"/>
+ <!-- set the security manager information for unit tests -->
+ <property name="java.security.policy" value="${basedir}/test.policy"/>
+
<!-- ================================================================== -->
<!-- Sets bind address and port used by jrunit/jgroups multicast socket -->
<!-- ================================================================== -->
@@ -924,13 +927,15 @@
<mkdir dir="${output.tests.tmp}"/>
<junit
printsummary="true" fork="yes" includeantruntime="true"
- tempdir="${output.tests.tmp}" maxmemory="1024m">
+ tempdir="${output.tests.tmp}" maxmemory="1280m">
<jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
<jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
<classpath>
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
@@ -977,6 +982,8 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
@@ -1029,6 +1036,8 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
@@ -1057,6 +1066,8 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
@@ -1089,6 +1100,8 @@
<path refid="${classpath}"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
@@ -1129,6 +1142,8 @@
<path refid="${classpath}"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
@@ -1175,6 +1190,8 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
@@ -1201,6 +1218,8 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
<sysproperty key="jrunit.mcast_port" value="${multicast.port}"/>
@@ -1262,6 +1281,8 @@
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<!-- this is needed for the remoting.marshall.dynamic.remote.MarshallerLoadingServer -->
<jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
<formatter type="xml"/>
@@ -1288,6 +1309,8 @@
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
<!--<path refid="third_party.classpath"/> -->
</classpath>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
<sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
<sysproperty key="jrunit.mcast_port" value="${multicast.port}"/>
@@ -1722,6 +1745,8 @@
<jvmarg value="-Dclient.path=${client.classpath}"/>
<jvmarg value="-Dserver.path=${server.classpath}"/>
<!--<jvmarg value="-Djboss.remoting.pre_2_0_compatible=${jboss.remoting.pre_2_0_compatible}"/>-->
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
@@ -1753,6 +1778,8 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dremoting.metadata=check_connection=${check_connection}"/>
<jvmarg value="-Dcheck_content_type=${check_content_type}"/>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
@@ -1785,6 +1812,8 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dremoting.metadata=check_connection=${check_connection}"/>
<jvmarg value="-Dcheck_content_type=${check_content_type}"/>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
@@ -1818,6 +1847,8 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dcheck_content_type=${check_content_type}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
<batchtest fork="yes" todir="${output.tests.results}"
@@ -1934,6 +1965,8 @@
<jvmarg value="-Dserver.pre_2_0_compatible=${server.pre_2_0_compatible}"/>
<jvmarg value="-Dclient.check_connection=${client.check_connection}"/>
<jvmarg value="-Dserver.check_connection=${server.check_connection}"/>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
@@ -1959,6 +1992,8 @@
<jvmarg value="-Dclient.path=${client.classpath}"/>
<jvmarg value="-Dserver.path=${server.classpath}"/>
<jvmarg value="-Djboss.remoting.pre_2_0_compatible=${jboss.remoting.pre_2_0_compatible}"/>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
@@ -1986,6 +2021,8 @@
<jvmarg value="-Dclient.path=${client.classpath}"/>
<jvmarg value="-Dserver.path=${server.classpath}"/>
<jvmarg value="-Djboss.remoting.pre_2_0_compatible=${jboss.remoting.pre_2_0_compatible}"/>
+ <sysproperty key="java.security.manager" value=""/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
<sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
<formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
extension="-${jboss-junit-configuration}.xml"/>
15 years, 9 months
JBoss Remoting SVN: r3589 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-07 12:37:44 -0500 (Fri, 07 Mar 2008)
New Revision: 3589
Modified:
remoting2/branches/2.x/test.policy
Log:
Add a comment...
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-07 17:09:13 UTC (rev 3588)
+++ remoting2/branches/2.x/test.policy 2008-03-07 17:37:44 UTC (rev 3589)
@@ -18,6 +18,7 @@
// Permissions for JGroups
grant {
+ // todo - need to find out exactly what jgroups is trying to do here in order to narrow this down
permission java.io.FilePermission "-", "read, write, delete";
permission java.io.FilePermission "/tmp/-", "read, write, delete";
};
15 years, 9 months
JBoss Remoting SVN: r3588 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-07 12:09:13 -0500 (Fri, 07 Mar 2008)
New Revision: 3588
Modified:
remoting2/branches/2.x/test.policy
Log:
A couple updates
Modified: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy 2008-03-07 16:54:48 UTC (rev 3587)
+++ remoting2/branches/2.x/test.policy 2008-03-07 17:09:13 UTC (rev 3588)
@@ -18,7 +18,8 @@
// Permissions for JGroups
grant {
- permission java.io.FilePermission "jg-magic-map.xml", "read, write, delete";
+ permission java.io.FilePermission "-", "read, write, delete";
+ permission java.io.FilePermission "/tmp/-", "read, write, delete";
};
// Permissions to run the test suite
@@ -37,5 +38,6 @@
// Uncomment for testing only
grant {
+// permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete";
// permission java.security.AllPermission;
};
\ No newline at end of file
15 years, 9 months
JBoss Remoting SVN: r3587 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2008-03-07 11:54:48 -0500 (Fri, 07 Mar 2008)
New Revision: 3587
Added:
remoting2/branches/2.x/test.policy
Log:
Add basic test security policy
Added: remoting2/branches/2.x/test.policy
===================================================================
--- remoting2/branches/2.x/test.policy (rev 0)
+++ remoting2/branches/2.x/test.policy 2008-03-07 16:54:48 UTC (rev 3587)
@@ -0,0 +1,41 @@
+
+// Permissions to run Remoting itself
+grant {
+ // Used by remote class loading system
+ permission java.lang.RuntimePermission "createClassLoader";
+
+ // Can't create sockets without it
+ permission java.net.SocketPermission "*:*", "accept,connect,listen,resolve";
+};
+
+// Permissions for JBoss Serialization
+grant {
+ permission java.lang.RuntimePermission "accessDeclaredMembers";
+ permission java.io.SerializablePermission "enableSubstitution";
+ permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
+ permission java.lang.RuntimePermission "reflectionFactoryAccess";
+};
+
+// Permissions for JGroups
+grant {
+ permission java.io.FilePermission "jg-magic-map.xml", "read, write, delete";
+};
+
+// Permissions to run the test suite
+grant {
+ // Used by at least one test case
+ permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
+};
+
+// Permissions for JUnit itself to function
+grant {
+ permission java.io.FilePermission "output/tests/-", "read, write, delete";
+ permission java.io.FilePermission "<<ALL FILES>>", "execute";
+ permission java.util.PropertyPermission "*", "read, write"; // todo - narrow this down a tad?
+ permission java.lang.RuntimePermission "setIO";
+};
+
+// Uncomment for testing only
+grant {
+// permission java.security.AllPermission;
+};
\ No newline at end of file
15 years, 9 months
JBoss Remoting SVN: r3586 - 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-07 03:02:02 -0500 (Fri, 07 Mar 2008)
New Revision: 3586
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java
Log:
JBREM-901: get() uses "127.0.0.1" as backup address.
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-07 07:43:44 UTC (rev 3585)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ident/Identity.java 2008-03-07 08:02:02 UTC (rev 3586)
@@ -28,6 +28,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
@@ -201,8 +202,18 @@
}
try
{
+ InetAddress localHost = null;
+ try
+ {
+ localHost = InetAddress.getLocalHost();
+ }
+ catch (IOException e)
+ {
+ localHost = InetAddress.getByName("127.0.0.1");
+ }
+
String serverid = (String) server.getAttribute(new ObjectName("JMImplementation:type=MBeanServerDelegate"), "MBeanServerId");
- Identity identity = new Identity(InetAddress.getLocalHost(), createId(server), serverid);
+ Identity identity = new Identity(localHost, createId(server), serverid);
identities.put(server, identity);
return identity;
}
15 years, 9 months