Review Request: JMC-5893: Commercial features check removed in JDK 11

Sharath Ballal sharath.ballal at oracle.com
Sat May 26 12:33:45 UTC 2018


Hi Erik,

Thanks for the review.

I had checked this, but not sure how I missed it.  Now I put some prints and verified that for JDK 9, 10 and 11 the ObjectName for JFR is "jdk.management.jfr:type=FlightRecorder".
For 8 & 7 I verified from code that the name is  "com.oracle.jrockit:type=FlightRecorder" but I when I use it I get a InstanceNotFoundException.  Am I missing anything?
(Actually if I check only for jdk.management.jfr:type=FlightRecorder it is enough since we only want this check to work in 11)

javax.management.InstanceNotFoundException: com.oracle.jrockit:type=FlightRecorder
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBeanInfo(DefaultMBeanServerInterceptor.java:1375)
	...
	...

Thanks,
Sharath


-----Original Message-----
From: Erik Gahlin 
Sent: Friday, May 25, 2018 3:16 PM
To: jmc-dev at openjdk.java.net
Subject: Re: Review Request: JMC-5893: Commercial features check removed in JDK 11

Hi Sharath,

As far as I know, the ObjectName for JFR has always been "jdk.management.jfr:type=FlightRecorder" for JDK 9, 10 and 11. For JDK 5, 6, 7 and 8, the name was "com.oracle.jrockit:type=FlightRecorder".

If this is incorrect, we have a terrible bug that has gone unnoticed.

Erik

> Please review the fix for:
>
>   
>
> JBS: https://bugs.openjdk.java.net/browse/JMC-5893
>
>   
>
> Webrev: http://cr.openjdk.java.net/~sballal/JMC-5893/webrev.00/
>
>   
>
> Following is the description of the testing done and result:
>
>   
>
> Ran mvn verify successfully.
>
> OpenJDK 11 - Does not show "Commercial feature" dialog box.  Recording 
> can be done, but cannot be loaded due to JMC-5895
>
> OracleJDK 11 - Shows "Commercial feature" dialog box as 
> "UnlockCommercialFeatures" flag is still present.  Recording can be 
> done, but cannot be loaded due to JMC-5895
>
> OpenJDK 10 (10.0.1) - Fails with message "Flight Recorder features are not enabled"
>
> OracleJDK 10 (10.0.1) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded.
>
> OpenJDK 9 (9.0.4.1-ojdkbuild) - Fails with message "Flight Recorder features are not enabled"
>
> OracleJDK 9 (9.0.4)- Shows "Commercial feature" dialog box. Recording can be done and gets loaded.
>
> OpenJDK 8 (1.8.0_91-3-ojdkbuild) - Fails with message "Flight Recorder features are not enabled"
>
> OracleJDK 8 (1.8.0_161) - Shows "Commercial feature" dialog box. Recording can be done and gets loaded.
>
> OpenJDK 7 (1.7.0-u80-unofficial) - Fails with message Flight Recorder 
> is not supported below 7U4. (same message without fix from a 
> standalone client)
>
> OracleJDK 7 (1.7.0_80) - Recording can be done and gets loaded (need to explicitly provide the UnlockCommercialFeatures and FlightRecorder options).
>
>   
>
> Thanks,
>
> Sharath
>
>   
>
>   



More information about the jmc-dev mailing list