org.apache.derby.iapi.services.jmx.ManagementService
| Modifier and Type | Field and Description |
|---|---|
| private static final SystemPermission | CONTROL
Control permission (permissions are immutable). |
| private MBeanServer | mbeanServer
Platform MBean server, from ManagementFactory.getPlatformMBeanServer(). |
| private ObjectName | myManagementBean
If this object is registered as a management mbean then myManagementBean represents its name. |
| private MBeanServer | |
| private Map | registeredMbeans
The set of mbeans registered to this service by Derby's code. |
| private String | systemIdentifier
Runtime value to disambiguate multiple Derby systems in the same virtual machine but different class loaders. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | boot(boolean
True if the database should be created create, Properties Configuration properties properties)Implements org. Start the management service if derby.system.jmx is true. |
| private void | checkJMXControl()
This method used to require SystemPermission("jmx", "control") to change the management state. |
| private synchronized void | findServer()
Initialize the management service by obtaining the platform MBeanServer and registering system beans. |
| private static ModuleFactory | |
| public synchronized String | getSystemIdentifier()
Implements org. Get the system identifier that this MBean is managing. |
| public synchronized boolean | isManagementActive()
Implements org. Is Derby's JMX management active. |
| private void | jmxRegister(final StandardMBean standardMBean, final ObjectName beanName)
Register an mbean with the platform mbean server. |
| private void | jmxUnregister(final ObjectName mbeanName)
Unregister an mbean from the JMX plaform server but leave it registered to this service. |
| public String | quotePropertyValue(String
the value to quote value)Implements org. Quote an MBean key property value, so that it is safe to pass to
|
| public synchronized <T> Object | registerMBean(final T
The MBean to wrap with a StandardMBean and register bean, final Class<T> The management interface for the MBean. beanInterface, final String The String representation of the MBean's key properties,
they will be added into the ObjectName with Derby's domain. Key
type should be first with a short name for the bean, typically the
class name without the package. keyProperties)Implements org. Registers an MBean with the MBean server as a StandardMBean. |
| public synchronized void | startManagement()
Implements org. Inform Derby to start its JMX management by registering MBeans relevant to its current state. |
| public synchronized void | |
| public synchronized void | stopManagement()
Implements org. Inform Derby to stop its JMX management by unregistering its MBeans. |
| public void | unregisterMBean(Object
An identifier returned by registerMBean. mbeanIdentifier)Implements org. Unregister an mbean using an object previous returned from registerMBean. |
| private synchronized void | unregisterMBean(final ObjectName
Bean to unregister. mbeanName)Unregisters an mbean from this service and JMX plaform server |
| CONTROL | back to summary |
|---|---|
| private static final SystemPermission CONTROL Control permission (permissions are immutable). | |
| mbeanServer | back to summary |
|---|---|
| private MBeanServer mbeanServer Platform MBean server, from ManagementFactory.getPlatformMBeanServer(). If not null then this service has registered mbeans with the plaform MBean server. If null then this service either has no mbeans registered or one mbean registered (representing itself). | |
| myManagementBean | back to summary |
|---|---|
| private ObjectName myManagementBean If this object is registered as a management mbean then myManagementBean represents its name. This will be non-null when derby.system.jmx is true. | |
| myManagementServer | back to summary |
|---|---|
| private MBeanServer myManagementServer | |
| registeredMbeans | back to summary |
|---|---|
| private Map<ObjectName, StandardMBean> registeredMbeans The set of mbeans registered to this service by Derby's code. These beans are registered with the platform mbean server if mbeanServer is not null. | |
| systemIdentifier | back to summary |
|---|---|
| private String systemIdentifier Runtime value to disambiguate multiple Derby systems in the same virtual machine but different class loaders. Set as the system attribute in the ObjectName for all MBeans registered. | |
| JMXManagementService | back to summary |
|---|---|
| public JMXManagementService() | |
| boot | back to summary |
|---|---|
| public synchronized void boot(boolean create, Properties properties) throws StandardException Implements org. Start the management service if derby.system.jmx is true. Starting the service means:
| |
| checkJMXControl | back to summary |
|---|---|
| private void checkJMXControl() This method used to require SystemPermission("jmx", "control") to change the management state. | |
| findServer | back to summary |
|---|---|
| private synchronized void findServer() Initialize the management service by obtaining the platform MBeanServer and registering system beans. Separate from boot() to allow future changes where the jmx management can be enabled on the fly. | |
| getMonitor | back to summary |
|---|---|
| private static ModuleFactory getMonitor() Must be private so that user code can't call this entry point. | |
| getSystemIdentifier | back to summary |
|---|---|
| public synchronized String getSystemIdentifier() Implements org. Doc from org. Get the system identifier that this MBean is managing. The system identifier is a runtime value to disambiguate multiple Derby systems in the same virtual machine but different class loaders.
| |
| isManagementActive | back to summary |
|---|---|
| public synchronized boolean isManagementActive() Implements org. Doc from org. Is Derby's JMX management active. If active then Derby has registered MBeans relevant to its current state.
| |
| jmxRegister | back to summary |
|---|---|
| private void jmxRegister(final StandardMBean standardMBean, final ObjectName beanName) throws JMException Register an mbean with the platform mbean server. | |
| jmxUnregister | back to summary |
|---|---|
| private void jmxUnregister(final ObjectName mbeanName) Unregister an mbean from the JMX plaform server but leave it registered to this service. This is so that if jmx is reenabled we can reestablish all vaid mbeans (that are still registered with this service). | |
| quotePropertyValue | back to summary |
|---|---|
| public String quotePropertyValue(String value) Implements org. Doc from org. Quote an MBean key property value, so that it is safe to pass to
| |
| registerMBean | back to summary |
|---|---|
| public synchronized <T> Object registerMBean(final T bean, final Class<T> beanInterface, final String keyProperties) throws StandardException Implements org. Registers an MBean with the MBean server as a StandardMBean. Use of the StandardMBean allows the implementation details of Derby's mbeans to be hidden from JMX, thus only exposing the MBean's interface in org.apache.derby.mbeans.
| |
| startManagement | back to summary |
|---|---|
| public synchronized void startManagement() Implements org. Doc from org. Inform Derby to start its JMX management by registering MBeans relevant to its current state. If Derby is not booted then no action is taken.
Require | |
| stop | back to summary |
|---|---|
| public synchronized void stop() Implements org. Doc from org. Stop the module. The module may be found via a findModule() method until some time after this method returns. Therefore the factory must be prepared to reject requests to it once it has been stopped. In addition other modules may cache a reference to the module and make requests of it after it has been stopped, these requests should be rejected as well. | |
| stopManagement | back to summary |
|---|---|
| public synchronized void stopManagement() Implements org. Doc from org. Inform Derby to stop its JMX management by unregistering its MBeans. If Derby is not booted then no action is taken.
Require | |
| unregisterMBean | back to summary |
|---|---|
| public void unregisterMBean(Object mbeanIdentifier) Implements org. Unregister an mbean using an object previous returned from registerMBean.
| |
| unregisterMBean | back to summary |
|---|---|
| private synchronized void unregisterMBean(final ObjectName mbeanName) Unregisters an mbean from this service and JMX plaform server
| |