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.
22 */
23
24
25 /*
26 * @test
27 * @bug 6760712
28 * @summary test the connector server option that causes it not to prevent the
29 * VM from exiting
30 * @author Shanliang JIANG, Eamonn McManus
31 * @modules java.management.rmi
32 * @run main/othervm DaemonRMIExporterTest
33 */
34 import java.util.Arrays;
35 import java.util.Collections;
36 import java.util.HashSet;
37 import java.util.Map;
38 import java.util.Set;
39
40 import javax.management.MBeanServerFactory;
41 import javax.management.remote.JMXConnector;
42 import javax.management.remote.JMXConnectorFactory;
43 import javax.management.remote.JMXServiceURL;
44 import javax.management.remote.JMXConnectorServer;
45 import javax.management.remote.JMXConnectorServerFactory;
46
47 // Test the connector server option that causes it not to prevent the VM
48 // from exiting. It's tricky to test exactly that, though possible. If
49 // we're being run from within jtreg, then jtreg has threads of its own
50 // that will prevent the VM from exiting. What's more it will kill all
51 // threads that the test created as soon as the main method returns,
|
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.
22 */
23
24
25 /*
26 * @test
27 * @bug 6760712
28 * @summary test the connector server option that causes it not to prevent the
29 * VM from exiting
30 * @author Shanliang JIANG, Eamonn McManus
31 *
32 * @run main/othervm DaemonRMIExporterTest
33 */
34 import java.util.Arrays;
35 import java.util.Collections;
36 import java.util.HashSet;
37 import java.util.Map;
38 import java.util.Set;
39
40 import javax.management.MBeanServerFactory;
41 import javax.management.remote.JMXConnector;
42 import javax.management.remote.JMXConnectorFactory;
43 import javax.management.remote.JMXServiceURL;
44 import javax.management.remote.JMXConnectorServer;
45 import javax.management.remote.JMXConnectorServerFactory;
46
47 // Test the connector server option that causes it not to prevent the VM
48 // from exiting. It's tricky to test exactly that, though possible. If
49 // we're being run from within jtreg, then jtreg has threads of its own
50 // that will prevent the VM from exiting. What's more it will kill all
51 // threads that the test created as soon as the main method returns,
|