< prev index next >

test/java/lang/management/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java

Print this page


   1 /*
   2  * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
   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.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug     6876135 7024172 7067691
  27  *
  28  * @summary Test PlatformLoggingMXBean
  29  *          This test performs similar testing as
  30  *          java/util/logging/LoggingMXBeanTest.
  31  *
  32  * @modules java.management
  33  *          jdk.management
  34  * @build PlatformLoggingMXBeanTest
  35  * @run main PlatformLoggingMXBeanTest
  36  */
  37 
  38 import javax.management.*;
  39 import java.lang.management.ManagementFactory;
  40 import java.lang.management.PlatformLoggingMXBean;
  41 import java.util.logging.*;
  42 import java.util.List;
  43 
  44 public class PlatformLoggingMXBeanTest
  45 {
  46     ObjectName objectName = null;
  47     static String LOGGER_NAME_1 = "com.sun.management.Logger1";
  48     static String LOGGER_NAME_2 = "com.sun.management.Logger2";
  49 
  50     // Use Logger instance variables to prevent premature garbage collection
  51     // of weak references.
  52     Logger logger1;
  53     Logger logger2;


   1 /*
   2  * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
   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.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug     6876135 7024172 7067691
  27  *
  28  * @summary Test PlatformLoggingMXBean
  29  *          This test performs similar testing as
  30  *          java/util/logging/LoggingMXBeanTest.
  31  *
  32  * @modules jdk.management

  33  * @build PlatformLoggingMXBeanTest
  34  * @run main PlatformLoggingMXBeanTest
  35  */
  36 
  37 import javax.management.*;
  38 import java.lang.management.ManagementFactory;
  39 import java.lang.management.PlatformLoggingMXBean;
  40 import java.util.logging.*;
  41 import java.util.List;
  42 
  43 public class PlatformLoggingMXBeanTest
  44 {
  45     ObjectName objectName = null;
  46     static String LOGGER_NAME_1 = "com.sun.management.Logger1";
  47     static String LOGGER_NAME_2 = "com.sun.management.Logger2";
  48 
  49     // Use Logger instance variables to prevent premature garbage collection
  50     // of weak references.
  51     Logger logger1;
  52     Logger logger2;


< prev index next >