Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318031

Summary: JMX: runtime mbean deployment occurs regardless of eclipselink.register.run.mbean sys property value
Product: z_Archived Reporter: Chris Delahunt <christopher.delahunt>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: gordon.yorke, michael.f.obrien
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 316513, 318032    
Attachments:
Description Flags
SVN rev# 7792 Enable true(new default) and false for MBean registration options none

Description Chris Delahunt CLA 2010-06-25 14:38:17 EDT
The eclipselink.register.run.mbean property check within the WebLogic_10_Platform class uses:
 shouldRegisterRuntimeBean = System.getProperty(JMX_REGISTER_RUN_MBEAN_PROPERTY) != null;
Meaning that even setting a -Declipselink.register.run.mbean=false will end up having the mbean deployed.  

Users should be able to pass in the eclipselink.register.run.mbean property rather than just being set through system properties, and the value should be respected - allowing it to be turned on/off instead of just on.
Comment 1 Michael OBrien CLA 2010-06-25 15:28:09 EDT
>The fact that "any" text will enable the property needs to be addressed in the common abstract platform class for WebLogic, JBoss and WebSphere for bug# 316513
Comment 2 Michael OBrien CLA 2010-06-25 15:54:34 EDT
>something like changing 
    protected boolean shouldRegisterRuntimeBean = System.getProperty(JMX_REGISTER_RUN_MBEAN_PROPERTY) != null;
>to
    protected boolean shouldRegisterDevelopmentBean = false;
..in the constructor or a static block

        String shouldRegisterRuntimeBeanProperty = System.getProperty(JMX_REGISTER_RUN_MBEAN_PROPERTY);
        if(null != shouldRegisterRuntimeBeanProperty && shouldRegisterRuntimeBeanProperty.toLowerCase().indexOf("true") > -1) {
            shouldRegisterRuntimeBean = true;
        }
Comment 3 Michael OBrien CLA 2010-07-08 23:17:26 EDT
>this was by design - see line 
    // Any value such as true will turn on the MBean
Comment 4 Michael OBrien CLA 2010-07-13 10:42:08 EDT
Created attachment 174157 [details]
SVN rev# 7792 Enable true(new default) and false for MBean registration options
Comment 5 Michael OBrien CLA 2010-07-13 10:42:31 EDT
>Fixed in SVN rev# 
http://fisheye2.atlassian.com/changelog/eclipselink/?cs=7792
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:14:08 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:34:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink