author | dbuck |
Tue, 18 Aug 2015 04:29:28 -0700 | |
changeset 32417 | 6859107fc6c3 |
parent 30376 | 2ccf2cf7ea48 |
child 43503 | bc7f8619ab70 |
permissions | -rw-r--r-- |
1243
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
1 |
/* |
30376
2ccf2cf7ea48
8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents:
23010
diff
changeset
|
2 |
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. |
21596 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
1243
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
22 |
*/ |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
23 |
|
21596 | 24 |
|
1243
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
25 |
import java.io.IOException; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
26 |
import java.io.Serializable; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
27 |
import java.net.Socket; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
28 |
import java.rmi.server.RMIClientSocketFactory; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
29 |
import java.util.HashMap; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
30 |
import javax.management.MBeanServer; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
31 |
import javax.management.MBeanServerFactory; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
32 |
import javax.management.Notification; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
33 |
import javax.management.NotificationBroadcasterSupport; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
34 |
import javax.management.NotificationListener; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
35 |
import javax.management.ObjectName; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
36 |
import javax.management.remote.JMXConnector; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
37 |
import javax.management.remote.JMXConnectorFactory; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
38 |
import javax.management.remote.JMXConnectorServer; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
39 |
import javax.management.remote.JMXConnectorServerFactory; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
40 |
import javax.management.remote.JMXServiceURL; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
41 |
import javax.management.remote.rmi.RMIConnectorServer; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
42 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
43 |
/* |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
44 |
* @test |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
45 |
* @bug 6697180 |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
46 |
* @summary test on a client notification deadlock. |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
47 |
* @author Shanliang JIANG |
30376
2ccf2cf7ea48
8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents:
23010
diff
changeset
|
48 |
* @modules java.management |
1243
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
49 |
* @run clean MultiThreadDeadLockTest |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
50 |
* @run build MultiThreadDeadLockTest |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
51 |
* @run main MultiThreadDeadLockTest |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
52 |
*/ |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
53 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
54 |
public class MultiThreadDeadLockTest { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
55 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
56 |
private static long serverTimeout = 500L; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
57 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
58 |
public static void main(String[] args) throws Exception { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
59 |
print("Create the MBean server"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
60 |
MBeanServer mbs = MBeanServerFactory.createMBeanServer(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
61 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
62 |
print("Initialize environment map"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
63 |
HashMap env = new HashMap(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
64 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
65 |
print("Specify a client socket factory to control socket creation."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
66 |
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
67 |
clientFactory); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
68 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
69 |
print("Specify a server idle timeout to make a server close an idle connection."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
70 |
env.put("jmx.remote.x.server.connection.timeout", serverTimeout); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
71 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
72 |
print("Disable client heartbeat."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
73 |
env.put("jmx.remote.x.client.connection.check.period", 0); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
74 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
75 |
env.put("jmx.remote.x.notification.fetch.timeout", serverTimeout); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
76 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
77 |
print("Create an RMI server"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
78 |
JMXServiceURL url = new JMXServiceURL("rmi", null, 0); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
79 |
JMXConnectorServer server = |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
80 |
JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
81 |
server.start(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
82 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
83 |
url = server.getAddress(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
84 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
85 |
print("Create jmx client on "+url); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
86 |
StateMachine.setState(CREATE_SOCKET); // allow to create client socket |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
87 |
client = JMXConnectorFactory.connect(url, env); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
88 |
Thread.sleep(100); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
89 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
90 |
totoName = new ObjectName("default:name=toto"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
91 |
mbs.registerMBean(toto, totoName); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
92 |
print("Register the mbean: " + totoName); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
93 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
94 |
print("Add listener to toto MBean"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
95 |
client.getMBeanServerConnection().addNotificationListener( |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
96 |
totoName, myListener, null, null); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
97 |
Thread.sleep(10); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
98 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
99 |
print("send notif, listener will block the fetcher"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
100 |
toto.sendNotif(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
101 |
Thread.sleep(100); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
102 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
103 |
StateMachine.setState(NO_OP); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
104 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
105 |
print("Sleep 3 times of server idle timeout: "+serverTimeout+ |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
106 |
", the sever should close the idle connection."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
107 |
Thread.sleep(serverTimeout*3); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
108 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
109 |
print("start the user thread to call mbean method, it will get IOexception" + |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
110 |
" and start the reconnection, the socket factory will block the" + |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
111 |
" socket creation."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
112 |
UserThread ut = new UserThread(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
113 |
ut.start(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
114 |
Thread.sleep(10); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
115 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
116 |
print("Free the listener, the fetcher will get IO and makes " + |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
117 |
"a deadlock if the bug is not fixed."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
118 |
StateMachine.setState(FREE_LISTENER); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
119 |
Thread.sleep(100); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
120 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
121 |
print("Allow to create new socket for the reconnection"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
122 |
StateMachine.setState(CREATE_SOCKET); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
123 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
124 |
print("Check whether the user thread gets free to call the mbean."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
125 |
if (!ut.waitDone(5000)) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
126 |
throw new RuntimeException("Possible deadlock!"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
127 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
128 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
129 |
print("Remove the listener."); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
130 |
client.getMBeanServerConnection().removeNotificationListener( |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
131 |
totoName, myListener, null, null); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
132 |
Thread.sleep(serverTimeout*3); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
133 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
134 |
print("\nWell passed, bye!"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
135 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
136 |
client.close(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
137 |
Thread.sleep(10); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
138 |
server.stop(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
139 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
140 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
141 |
private static ObjectName totoName = null; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
142 |
private static JMXConnector client; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
143 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
144 |
public static class UserThread extends Thread { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
145 |
public UserThread() { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
146 |
setDaemon(true); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
147 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
148 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
149 |
public void run() { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
150 |
try { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
151 |
client.getMBeanServerConnection().invoke( |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
152 |
totoName, "allowReturn", null, null); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
153 |
} catch (Exception e) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
154 |
throw new Error(e); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
155 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
156 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
157 |
synchronized(UserThread.class) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
158 |
done = true; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
159 |
UserThread.class.notify(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
160 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
161 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
162 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
163 |
public boolean waitDone(long timeout) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
164 |
synchronized(UserThread.class) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
165 |
if(!done) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
166 |
try { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
167 |
UserThread.class.wait(timeout); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
168 |
} catch (Exception e) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
169 |
throw new Error(e); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
170 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
171 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
172 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
173 |
return done; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
174 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
175 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
176 |
private boolean done = false; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
177 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
178 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
179 |
public static interface TotoMBean { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
180 |
public void allowReturn(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
181 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
182 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
183 |
public static class Toto extends NotificationBroadcasterSupport |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
184 |
implements TotoMBean { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
185 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
186 |
public void allowReturn() { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
187 |
enter("allowReturn"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
188 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
189 |
leave("allowReturn"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
190 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
191 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
192 |
public void sendNotif() { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
193 |
enter("sendNotif"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
194 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
195 |
sendNotification(new Notification("Toto", totoName, 0)); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
196 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
197 |
leave("sendNotif"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
198 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
199 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
200 |
private static Toto toto = new Toto(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
201 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
202 |
public static NotificationListener myListener = new NotificationListener() { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
203 |
public void handleNotification(Notification notification, Object handback) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
204 |
enter("handleNotification"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
205 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
206 |
StateMachine.waitState(FREE_LISTENER); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
207 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
208 |
leave("handleNotification"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
209 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
210 |
}; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
211 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
212 |
public static class RMIClientFactory |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
213 |
implements RMIClientSocketFactory, Serializable { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
214 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
215 |
public Socket createSocket(String host, int port) throws IOException { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
216 |
enter("createSocket"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
217 |
//print("Calling createSocket(" + host + " " + port + ")"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
218 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
219 |
StateMachine.waitState(CREATE_SOCKET); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
220 |
Socket s = new Socket(host, port); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
221 |
leave("createSocket"); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
222 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
223 |
return s; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
224 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
225 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
226 |
private static RMIClientFactory clientFactory = new RMIClientFactory(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
227 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
228 |
private static int CREATE_SOCKET = 1; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
229 |
private static int FREE_LISTENER = 3; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
230 |
private static int NO_OP = 0; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
231 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
232 |
public static class StateMachine { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
233 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
234 |
private static int state = NO_OP; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
235 |
private static int[] lock = new int[0]; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
236 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
237 |
public static void waitState(int s) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
238 |
synchronized (lock) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
239 |
while (state != s) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
240 |
try { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
241 |
lock.wait(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
242 |
} catch (InterruptedException ire) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
243 |
// should not |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
244 |
throw new Error(ire); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
245 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
246 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
247 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
248 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
249 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
250 |
public static int getState() { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
251 |
synchronized (lock) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
252 |
return state; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
253 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
254 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
255 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
256 |
public static void setState(int s) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
257 |
synchronized (lock) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
258 |
state = s; |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
259 |
lock.notifyAll(); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
260 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
261 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
262 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
263 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
264 |
private static void print(String m) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
265 |
System.out.println(m); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
266 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
267 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
268 |
private static void enter(String m) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
269 |
System.out.println("\n---Enter the method " + m); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
270 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
271 |
|
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
272 |
private static void leave(String m) { |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
273 |
System.out.println("===Leave the method: " + m); |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
274 |
} |
f5d91fb6df32
6697180: JMX query results in java.io.IOException: Illegal state - also a deadlock can also be seen
sjiang
parents:
diff
changeset
|
275 |
} |