Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » core » [javadoc | source]
org.apache.catalina.core
public class: NamingContextListener [javadoc | source]
java.lang.Object
   org.apache.catalina.core.NamingContextListener

All Implemented Interfaces:
    ContainerListener, PropertyChangeListener, LifecycleListener

Helper class used to initialize and populate the JNDI context associated with each context and server.
Field Summary
protected  Log logger     
protected  String name    Name of the associated naming context. 
protected  Object container    Associated container. 
protected  boolean initialized    Initialized flag. 
protected  NamingResources namingResources    Associated naming resources. 
protected  NamingContext namingContext    Associated JNDI context. 
protected  Context compCtx    Comp context. 
protected  Context envCtx    Env context. 
protected  HashMap objectNames    Objectnames hashtable. 
protected static  StringManager sm    The string manager for this package. 
Method from org.apache.catalina.core.NamingContextListener Summary:
addEjb,   addEnvironment,   addLocalEjb,   addResource,   addResourceEnvRef,   addResourceLink,   addService,   containerEvent,   createObjectName,   getCompContext,   getEnvContext,   getName,   getNamingContext,   lifecycleEvent,   propertyChange,   removeEjb,   removeEnvironment,   removeLocalEjb,   removeResource,   removeResourceEnvRef,   removeResourceLink,   removeService,   setName
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.core.NamingContextListener Detail:
 public  void addEjb(ContextEjb ejb) 
    Set the specified EJBs in the naming context.
 public  void addEnvironment(ContextEnvironment env) 
    Set the specified environment entries in the naming context.
 public  void addLocalEjb(ContextLocalEjb localEjb) 
    Set the specified local EJBs in the naming context.
 public  void addResource(ContextResource resource) 
    Set the specified resources in the naming context.
 public  void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef) 
    Set the specified resources in the naming context.
 public  void addResourceLink(ContextResourceLink resourceLink) 
    Set the specified resource link in the naming context.
 public  void addService(ContextService service) 
    Set the specified web service in the naming context.
 public  void containerEvent(ContainerEvent event) 
    Acknowledge the occurrence of the specified event. Note: Will never be called when the listener is associated to a Server, since it is not a Container.
 protected ObjectName createObjectName(ContextResource resource) throws MalformedObjectNameException 
    Create an ObjectName for this ContextResource object.
 public Context getCompContext() 
    Return the comp context.
 public Context getEnvContext() 
    Return the env context.
 public String getName() 
    Return the "name" property.
 public NamingContext getNamingContext() 
    Return the associated naming context.
 public  void lifecycleEvent(LifecycleEvent event) 
    Acknowledge the occurrence of the specified event.
 public  void propertyChange(PropertyChangeEvent event) 
    Process property change events. Currently, only listens to such events on the NamingResources instance for the global naming resources.
 public  void removeEjb(String name) 
    Set the specified EJBs in the naming context.
 public  void removeEnvironment(String name) 
    Set the specified environment entries in the naming context.
 public  void removeLocalEjb(String name) 
    Set the specified local EJBs in the naming context.
 public  void removeResource(String name) 
    Set the specified resources in the naming context.
 public  void removeResourceEnvRef(String name) 
    Set the specified resources in the naming context.
 public  void removeResourceLink(String name) 
    Set the specified resources in the naming context.
 public  void removeService(String name) 
    Set the specified web services in the naming context.
 public  void setName(String name) 
    Set the "name" property.