lang-management modification - it may break customer application? (original) (raw)
Jing LV lvjing at linux.vnet.ibm.com
Thu Jun 30 05:45:09 UTC 2011
- Previous message: lang-management modification - it may break customer application?
- Next message: hg: jdk8/tl/langtools: 7060926: Attr.PostAttrAnalyzer misses a case
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Mandy,
Thank you for reply. I am using a similar testcases but I see the problem is that it use a wrong PlatformMBeanServer - fix it will help to pass the testcase. Your reply helps me to understand the full picture, thank you.
δΊ 2011-6-30 13:06, Mandy Chung ει:
Hi Jing,
I'm including the serviceability-dev mailing list as java.lang.management is a serviceability feature. On 6/30/11 12:32 PM, Jing LV wrote: Hello,
I see there is some modifiction in the java.lang.management.ManagementFactory, e.g, newPlatformMXBeanProxy. The LogManager.LOGGINGMXBEANNAME in Java7 has been changed and now represents PlatformLoggingMXBean rather than java.util.logging.LoggingMXBean. If it's accessed via an MBeanServer, this should not make any difference since both LoggingMXBean and PlatformLoggingMXBean defines the same attributes. I understand this is the stradegy to move all MXBean into java.lang.management package. However in JDK6, customers may already use java.lang.management.ManagementFactory.newPlatformMXBeanProxy(someserver, LogManager.LOGGINGMXBEANNAME, LoggingMXBean) to get LoggingMXBean and in JDK7 he would meet a IllegalArgumentException. This should work in both JDK 6 and JDK 7. A regression test in the JDK explicitly checks this method retains the same behavior: LoggingMXBean proxy = ManagementFactory.newPlatformMXBeanProxy(mbs, LogManager.LOGGINGMXBEANNAME, LoggingMXBean.class); See http://hg.openjdk.java.net/jdk7/tl/jdk/file/cfd7602f5c52/test/java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java Do you have a test case reproducing IAE? Mandy
-- Best Regards, Jimmy, Jing LV
- Previous message: lang-management modification - it may break customer application?
- Next message: hg: jdk8/tl/langtools: 7060926: Attr.PostAttrAnalyzer misses a case
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]