Package org.apache.catalina.mbeans
Class GlobalResourcesLifecycleListener
- java.lang.Object
-
- org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
-
- All Implemented Interfaces:
LifecycleListener
public class GlobalResourcesLifecycleListener extends java.lang.Object implements LifecycleListener
Implementation ofLifecycleListener
that instantiates the set of MBeans associated with global JNDI resources that are subject to management.This listener must only be nested within
Server
elements.- Since:
- 4.1
- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description protected Lifecycle
component
The owning Catalina component that we are attached to.protected static StringManager
sm
-
Constructor Summary
Constructors Constructor Description GlobalResourcesLifecycleListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createMBeans()
Create the MBeans for the interesting global JNDI resources.protected void
createMBeans(java.lang.String prefix, javax.naming.Context context)
Create the MBeans for the interesting global JNDI resources in the specified naming context.protected void
createMBeans(java.lang.String name, UserDatabase database)
Create the MBeans for the specified UserDatabase and its contents.protected void
destroyMBeans()
Destroy the MBeans for the interesting global JNDI resources.void
lifecycleEvent(LifecycleEvent event)
Primary entry point for startup and shutdown events.
-
-
-
Field Detail
-
sm
protected static final StringManager sm
-
component
protected Lifecycle component
The owning Catalina component that we are attached to.
-
-
Method Detail
-
lifecycleEvent
public void lifecycleEvent(LifecycleEvent event)
Primary entry point for startup and shutdown events.- Specified by:
lifecycleEvent
in interfaceLifecycleListener
- Parameters:
event
- The event that has occurred
-
createMBeans
protected void createMBeans()
Create the MBeans for the interesting global JNDI resources.
-
createMBeans
protected void createMBeans(java.lang.String prefix, javax.naming.Context context) throws javax.naming.NamingException
Create the MBeans for the interesting global JNDI resources in the specified naming context.- Parameters:
prefix
- Prefix for complete object name pathscontext
- Context to be scanned- Throws:
javax.naming.NamingException
- if a JNDI exception occurs
-
createMBeans
protected void createMBeans(java.lang.String name, UserDatabase database) throws java.lang.Exception
Create the MBeans for the specified UserDatabase and its contents.- Parameters:
name
- Complete resource name of this UserDatabasedatabase
- The UserDatabase to be processed- Throws:
java.lang.Exception
- if an exception occurs while creating MBeans
-
destroyMBeans
protected void destroyMBeans()
Destroy the MBeans for the interesting global JNDI resources.
-
-