db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John H. Embretsen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3424) Add an MBean that an application can register to change the state of Derby's JMX management
Date Mon, 18 Feb 2008 14:58:35 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12569918#action_12569918

John H. Embretsen commented on DERBY-3424:

Here's a summary of my current understanding of (parts of) this feature from reading the code
that is committed so far. 
Please correct me if I'm wrong: 
  - Derby's Management Service is booted regardless of the value of 
  - If the VM does not support JMX (meaning: platform management), an 
    "empty" Management service is booted instead of the "real" one.
  - If the value of derby.system.jmx is true, all the current MBeans are 
    registered with both the platform MBeanServer and Derby's Management 
    service, and will be available to JMX clients. 
  - Otherwise (derby.system.jmx is non-true), all the current MBeans except
    the ManagementMBean are "registered" with Derby's Management service, 
    but are not registered with the MBeanServer, and will thus not be 
    available to JMX clients.
  - To enable Derby-JMX at runtime, the JMX client has to create and 
    register the ManagementMBean with the MBean server, and then invoke
    the startManagement() operation. 
    - Then the MBeans "registered" with Derby's management service are also
      automatically registered with the MBean server. This currently only
      includes the VersionMBean.

Some questions/comments:

 1) Can the Management Service (module) be stopped (I guess this means 
    permanently disabled) by the user? If so, how?

 2) How may/will MBeans such as the JDBCMBean (which are normally 
    registered e.g. at driver boot time) be registered if JMX management
    is disabled at startup of Derby, but enabled later by using the 

 3) It is slightly confusing that the term "registered" is used both
    for MBeans registered with JMX (the MBean server) and for MBeans 
    instantiated and stored with Derby's Management service. The code needs
    to be commented carefully in order to avoid misunderstandings. So far 
    so good, but I wonder if this might become a problem when more code is 

 4) In jmxUnregister(), there is a TODO item for error handling, which is 
    fair enough. Is the associated comment is still valid? If so, I need 
    some help understanding what "shutdown" means in this context:

    } catch (PrivilegedActionException pae) {
        // TODO - this is called on shutdown where
        // we don't really care about errors.

> Add an MBean that an application can register to change the state of Derby's JMX management
> -------------------------------------------------------------------------------------------
>                 Key: DERBY-3424
>                 URL: https://issues.apache.org/jira/browse/DERBY-3424
>             Project: Derby
>          Issue Type: New Feature
>            Reporter: Daniel John Debrunner
>            Assignee: Daniel John Debrunner
>            Priority: Minor
> JMX in Derby was originally proposed as a mechanism to configure Derby replacing or enhancing
the system properties which tend to be static in nature. Thus it is somewhat ironic that jmx
is enabled with a static system property derby.system.jmx.
> I propose to add a public mbean that allows the state Derby's JMX management to be changed.
This bean is not automatically registered by Derby if derby.system.jmx is false, but instead
can be registered by an application. I believe this could occur at any time so that JMX could
be enabled on a running application, possibly by a remote client.
> This standard Mbean (o.a.d.mbeans.Management & ManagementMBean) would have these
operations & attribute:
>     public boolean isManagementActive();
>     public void startManagement(); 
>     public void stopManagement();
> If Derby is not booted within the jvm then the operations would be no-ops.
> If derby.system.jmx is true then Derby will itself register an mbean that implements
ManagementMBean to allow dynamic control of the visibility of Derby's mbeans.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message