javax.management.remote.rmi.RMIConnection Java Examples
The following examples show how to use
javax.management.remote.rmi.RMIConnection.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConnectorStopDeadlockTest.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #2
Source File: ConnectorStopDeadlockTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #3
Source File: ConnectorStopDeadlockTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #4
Source File: ConnectorStopDeadlockTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #5
Source File: ConnectorStopDeadlockTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #6
Source File: ConnectorStopDeadlockTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #7
Source File: ConnectorStopDeadlockTest.java From hottub with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #8
Source File: ConnectorStopDeadlockTest.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #9
Source File: ConnectorStopDeadlockTest.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #10
Source File: ConnectorStopDeadlockTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #11
Source File: ConnectorStopDeadlockTest.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #12
Source File: ConnectorStopDeadlockTest.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #13
Source File: ConnectorStopDeadlockTest.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #14
Source File: ConnectorStopDeadlockTest.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #15
Source File: ConnectorStopDeadlockTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #16
Source File: ConnectorStopDeadlockTest.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #17
Source File: ConnectorStopDeadlockTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #18
Source File: ConnectorStopDeadlockTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #19
Source File: ConnectorStopDeadlockTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #20
Source File: ConnectorStopDeadlockTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #21
Source File: ConnectorStopDeadlockTest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #22
Source File: ConnectorStopDeadlockTest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #23
Source File: ConnectorStopDeadlockTest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #24
Source File: ConnectorStopDeadlockTest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #25
Source File: ConnectorStopDeadlockTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public static void main(String[] args) throws Exception { JMXServiceURL url = new JMXServiceURL("service:jmx:rmi://"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); RMIJRMPServerImplSub impl = new RMIJRMPServerImplSub(); System.out.println("Creating connectorServer"); connectorServer = new RMIConnectorServer(url, null, impl, mbs); System.out.println("Starting connectorServer"); connectorServer.start(); System.out.println("Making client"); RMIConnection cc = impl.newClient(null); System.out.println("Closing client"); cc.close(); if (connectorServer.isActive()) { System.out.println("Stopping connectorServer"); connectorServer.stop(); } if (failure == null) System.out.println("TEST PASSED, no deadlock"); else System.out.println("TEST FAILED"); }
Example #26
Source File: ConnectorStopDeadlockTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override protected void clientClosed(RMIConnection conn) throws IOException { System.out.println("clientClosed, will call connectorServer.stop"); final Exchanger<Void> x = new Exchanger<Void>(); Thread t = new Thread() { public void run() { try { connectorServer.stop(); } catch (Exception e) { fail(e); } } }; t.setName("connectorServer.stop"); t.start(); waitForBlock(t); /* If this thread is synchronized on RMIServerImpl, then * the thread that does connectorServer.stop will acquire * the clientList lock and then block waiting for the RMIServerImpl * lock. Our call to super.clientClosed will then deadlock because * it needs to acquire the clientList lock. */ System.out.println("calling super.clientClosed"); System.out.flush(); super.clientClosed(conn); }
Example #27
Source File: ConnectorStopDeadlockTest.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public RMIConnection makeClient() throws IOException { return super.makeClient("connection id", null); }
Example #28
Source File: DeadListenerTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Override protected RMIConnection makeClient(String id, Subject subject) throws IOException { RMIConnectionImpl conn = (RMIConnectionImpl) super.makeClient(id, subject); connections.add(conn); return conn; }
Example #29
Source File: ConnectorStopDeadlockTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public RMIConnection makeClient() throws IOException { return super.makeClient("connection id", null); }
Example #30
Source File: ConnectorStopDeadlockTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public RMIConnection makeClient() throws IOException { return super.makeClient("connection id", null); }