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;
|
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 * @summary Test PlatformLoggingMXBean
28 * This test performs similar testing as
29 * java/util/logging/LoggingMXBeanTest.
30 *
31 * @build PlatformLoggingMXBeanTest
32 * @run main PlatformLoggingMXBeanTest
33 */
34
35 import javax.management.*;
36 import java.lang.management.ManagementFactory;
37 import java.lang.management.PlatformLoggingMXBean;
38 import java.util.logging.*;
39 import java.util.List;
40
41 public class PlatformLoggingMXBeanTest
42 {
43 ObjectName objectName = null;
44 static String LOGGER_NAME_1 = "com.sun.management.Logger1";
45 static String LOGGER_NAME_2 = "com.sun.management.Logger2";
46
47 // Use Logger instance variables to prevent premature garbage collection
48 // of weak references.
49 Logger logger1;
50 Logger logger2;
|