[
https://issues.jboss.org/browse/AS7-5408?page=com.atlassian.jira.plugin.s...
]
Taras Tielkes updated AS7-5408:
-------------------------------
Description:
I'm using the "jboss-client.jar" provided in the "bin/client"
directory of the 7.1.1.Final distribution.
I'm using the code shown below to connect to various JBoss 7.1.1 instances.
This works when the machines are reachable.
However, when they are not, the underlying "xnio" libraries do not clean up
properly.
Observed results: client JVM running my JMX code does not exit, since the background
threads from xnio are non-deamon.
I'll attach a stackdump of the handing JVM as well.
{code}import java.io.IOException;
import java.net.MalformedURLException;
import java.util.HashMap;
import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
public class Demo {
public static void main(String[] args) throws IOException {
JMXConnector jmxConnector = null;
String host = "some.unreachable.host";
String port = "9999";
String urlString = "service:jmx:remoting-jmx://" + host + ":" +
port;
try {
JMXServiceURL serviceURL = new JMXServiceURL(urlString);
HashMap<String, String[]> env = new HashMap<String, String[]>();
String[] creds = new String[2];
creds[0] = "username";
creds[1] = "password";
env.put(JMXConnector.CREDENTIALS, creds);
jmxConnector = JMXConnectorFactory.connect(serviceURL, env);
MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
System.out.println("Successfully Got Connection " +
connection.getMBeanCount());
jmxConnector.close();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (jmxConnector != null) {
jmxConnector.close();
}
}
System.exit(0);
}
}{code}
was:
I'm using the "jboss-client.jar" provided in the "bin/client"
directory of the 7.1.1.Final distribution.
I'm using the code shown below to connect to various JBoss 7.1.1 instances.
This works when the machines are reachable.
However, when they are not, the underlying "xnio" libraries do not clean up
properly.
Observed results: client JVM running my JMX code does not exit, since the background
threads from xnio are non-deamon.
I'll attach a stackdump of the handing JVM as well.
{code}import java.io.IOException;
import java.net.MalformedURLException;
import java.util.HashMap;
import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
public class Demo {
public static void main(String[] args) {
String host = "some.unreachable.host";
String port = "9999";
String urlString = "service:jmx:remoting-jmx://" + host + ":" +
port;
try {
JMXServiceURL serviceURL = new JMXServiceURL(urlString);
HashMap<String, String[]> env = new HashMap<String, String[]>();
String[] creds = new String[2];
creds[0] = "username";
creds[1] = "password";
env.put(JMXConnector.CREDENTIALS, creds);
JMXConnector jmxConnector = JMXConnectorFactory.connect(serviceURL, env);
MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
System.out.println("Successfully Got Connection " +
connection.getMBeanCount());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
System.exit(0);
}
}
{code}
Background org.xnio.nio.WorkerThread prevents JVM shutdown (using
jboss-client.jar for remote JMX access)
---------------------------------------------------------------------------------------------------------
Key: AS7-5408
URL:
https://issues.jboss.org/browse/AS7-5408
Project: Application Server 7
Issue Type: Bug
Components: JMX
Affects Versions: 7.1.1.Final
Environment: Windows XP x64, using Java 7
Reporter: Taras Tielkes
Assignee: Stuart Douglas
I'm using the "jboss-client.jar" provided in the "bin/client"
directory of the 7.1.1.Final distribution.
I'm using the code shown below to connect to various JBoss 7.1.1 instances.
This works when the machines are reachable.
However, when they are not, the underlying "xnio" libraries do not clean up
properly.
Observed results: client JVM running my JMX code does not exit, since the background
threads from xnio are non-deamon.
I'll attach a stackdump of the handing JVM as well.
{code}import java.io.IOException;
import java.net.MalformedURLException;
import java.util.HashMap;
import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
public class Demo {
public static void main(String[] args) throws IOException {
JMXConnector jmxConnector = null;
String host = "some.unreachable.host";
String port = "9999";
String urlString = "service:jmx:remoting-jmx://" + host + ":" +
port;
try {
JMXServiceURL serviceURL = new JMXServiceURL(urlString);
HashMap<String, String[]> env = new HashMap<String, String[]>();
String[] creds = new String[2];
creds[0] = "username";
creds[1] = "password";
env.put(JMXConnector.CREDENTIALS, creds);
jmxConnector = JMXConnectorFactory.connect(serviceURL, env);
MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
System.out.println("Successfully Got Connection " +
connection.getMBeanCount());
jmxConnector.close();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (jmxConnector != null) {
jmxConnector.close();
}
}
System.exit(0);
}
}{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira