jmx-dev RFR: 8318707: Remove the Java Management Extension (JMX) Management Applet (m-let) feature [v3]

Daniel Fuchs dfuchs at openjdk.org
Wed Jan 10 14:07:29 UTC 2024


On Thu, 4 Jan 2024 10:48:38 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> Remove the MLet feature and its tests.
>> 
>> Some tests use MLet classes but are not testing MLets.  These are updated, to use another test MBean or an MBean which is a URLClassLoader, e.g.
>> test/jdk/javax/management/MBeanServer/PostExceptionTest.java
>> test/jdk/javax/management/remote/mandatory/loading/TargetMBeanTest.java
>
> Kevin Walls has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove unnecessary MLET_ Properties

test/jdk/javax/management/Introspector/ClassLeakTest.java line 55:

> 53:         ObjectName testName = new ObjectName("x:name=Test");
> 54:         Test mbean = new Test();
> 55:         mbs.registerMBean(mbean, testName);

I suspect this test should first register an MBean which is a ClassLoader implementing PrivateClassLoader, through which the TestMBean would be loaded in order to preserve the semantics of the test.

In other words, replace the MLet with a regular MBean that extends URLClassLoader and implements PrivateClassLoader and do the same thing than the original test was doing.

test/jdk/javax/management/mxbean/MXBeanLoadingTest1.java line 85:

> 83:             MBeanServer mbs = MBeanServerFactory.createMBeanServer();
> 84:             ObjectName testName = new ObjectName("x:type=test");
> 85:             ObjectInstance mb = mbs.createMBean(Test.class.getName(), testName);

Same remark here - I think we need to first register an MBean which is a ClassLoader and implements PrivateClassLoader to replace the MLet in this test.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16363#discussion_r1447419444
PR Review Comment: https://git.openjdk.org/jdk/pull/16363#discussion_r1447428031


More information about the jmx-dev mailing list