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 Sun, 17 Feb 2008 16:20:34 GMT

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

John H. Embretsen commented on DERBY-3424:
------------------------------------------

Interesting approach. So I guess the plan is to allow remote JMX clients to enable Derby-JMX
at runtime by doing something like this?

    JMXServiceURL url = new JMXServiceURL(
                "service:jmx:rmi:///jndi/rmi://" + HOSTNAME + ":" + JMXPORT +"/jmxrmi");
    JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
    MBeanServerConnection mbeanServerConn = jmxc.getMBeanServerConnection();
    ObjectName mgmtObjName = new ObjectName("org.apache.derby", "type", "Management");
    ObjectInstance mgmtObj = mbeanServerConn.createMBean("org.apache.derby.mbeans.Management",
mgmtObjName);

(and then invoke operations on that MBean).

With the current code line, I get an

    Exception in thread "main" javax.management.ReflectionException: The MBean class could
not be loaded by the default loader repository

I assume some special handling of class loaders/loading is needed on the server-side as long
as we're using the platform MBeanServer... any thoughts on this?

An admin can probably control access to this feature by using a security policy file, but
are there any specific plans within the 10.4 timeframe with regards to security & this
feature?

> 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.


Mime
View raw message