org.apache.catalina.mbeans

Class GlobalResourcesLifecycleListener

Implemented Interfaces:
LifecycleListener

public class GlobalResourcesLifecycleListener
extends java.lang.Object
implements LifecycleListener

Implementation of LifecycleListener that instantiates the set of MBeans associated with global JNDI resources that are subject to management.

Version:
$Revision: 1.5 $ $Date: 2004/06/09 20:38:16 $

Author:
Craig R. McClanahan

Since:
4.1

Field Summary

protected Lifecycle
component
The owning Catalina component that we are attached to.
protected int
debug
The debugging detail level for this component.
protected static Registry
registry
The configuration information registry for our managed beans.

Method Summary

protected void
createMBeans()
Create the MBeans for the interesting global JNDI resources.
protected void
createMBeans(String prefix, Context context)
Create the MBeans for the interesting global JNDI resources in the specified naming context.
protected void
createMBeans(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.
int
getDebug()
void
lifecycleEvent(LifecycleEvent event)
Primary entry point for startup and shutdown events.
protected void
log(String message)
Log a message.
protected void
log(String message, Throwable throwable)
Log a message and associated exception.
void
setDebug(int debug)

Field Details

component

protected Lifecycle component
The owning Catalina component that we are attached to.


debug

protected int debug
The debugging detail level for this component.


registry

protected static Registry registry
The configuration information registry for our managed beans.

Method Details

createMBeans

protected void createMBeans()
Create the MBeans for the interesting global JNDI resources.


createMBeans

protected void createMBeans(String prefix,
                            Context context)
            throws NamingException
Create the MBeans for the interesting global JNDI resources in the specified naming context.

Parameters:
prefix - Prefix for complete object name paths
context - Context to be scanned


createMBeans

protected void createMBeans(String name,
                            UserDatabase database)
            throws Exception
Create the MBeans for the specified UserDatabase and its contents.

Parameters:
name - Complete resource name of this UserDatabase
database - The UserDatabase to be processed


destroyMBeans

protected void destroyMBeans()
Destroy the MBeans for the interesting global JNDI resources.


getDebug

public int getDebug()


lifecycleEvent

public void lifecycleEvent(LifecycleEvent event)
Primary entry point for startup and shutdown events.
Specified by:
lifecycleEvent in interface LifecycleListener

Parameters:
event - The event that has occurred


log

protected void log(String message)
Log a message.

Parameters:
message - The message to be logged


log

protected void log(String message,
                   Throwable throwable)
Log a message and associated exception.

Parameters:
message - The message to be logged
throwable - The exception to be logged


setDebug

public void setDebug(int debug)


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.