|
Apache Tomcat 7.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.core.NamingContextListener
public class NamingContextListener
Helper class used to initialize and populate the JNDI context associated with each context and server.
Field Summary | |
---|---|
protected Context |
compCtx
Comp context. |
protected Object |
container
Associated container. |
protected Context |
envCtx
Env context. |
protected boolean |
initialized
Initialized flag. |
protected Log |
logger
|
protected String |
name
Name of the associated naming context. |
protected NamingContext |
namingContext
Associated JNDI context. |
protected NamingResources |
namingResources
Associated naming resources. |
protected HashMap<String,ObjectName> |
objectNames
Objectnames hashtable. |
protected static StringManager |
sm
The string manager for this package. |
Constructor Summary | |
---|---|
NamingContextListener()
|
Method Summary | |
---|---|
void |
addEjb(ContextEjb ejb)
Set the specified EJBs in the naming context. |
void |
addEnvironment(ContextEnvironment env)
Set the specified environment entries in the naming context. |
void |
addLocalEjb(ContextLocalEjb localEjb)
Set the specified local EJBs in the naming context. |
void |
addResource(ContextResource resource)
Set the specified resources in the naming context. |
void |
addResourceEnvRef(ContextResourceEnvRef resourceEnvRef)
Set the specified resources in the naming context. |
void |
addResourceLink(ContextResourceLink resourceLink)
Set the specified resource link in the naming context. |
void |
addService(ContextService service)
Set the specified web service in the naming context. |
void |
containerEvent(ContainerEvent event)
Acknowledge the occurrence of the specified event. |
protected ObjectName |
createObjectName(ContextResource resource)
Create an ObjectName for this
ContextResource object. |
Context |
getCompContext()
Return the comp context. |
Context |
getEnvContext()
Return the env context. |
String |
getName()
Return the "name" property. |
NamingContext |
getNamingContext()
Return the associated naming context. |
void |
lifecycleEvent(LifecycleEvent event)
Acknowledge the occurrence of the specified event. |
void |
propertyChange(PropertyChangeEvent event)
Process property change events. |
void |
removeEjb(String name)
Set the specified EJBs in the naming context. |
void |
removeEnvironment(String name)
Set the specified environment entries in the naming context. |
void |
removeLocalEjb(String name)
Set the specified local EJBs in the naming context. |
void |
removeResource(String name)
Set the specified resources in the naming context. |
void |
removeResourceEnvRef(String name)
Set the specified resources in the naming context. |
void |
removeResourceLink(String name)
Set the specified resources in the naming context. |
void |
removeService(String name)
Set the specified web services in the naming context. |
void |
setName(String name)
Set the "name" property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Log logger
protected String name
protected Object container
protected boolean initialized
protected NamingResources namingResources
protected NamingContext namingContext
protected Context compCtx
protected Context envCtx
protected HashMap<String,ObjectName> objectNames
protected static final StringManager sm
Constructor Detail |
---|
public NamingContextListener()
Method Detail |
---|
public String getName()
public void setName(String name)
name
- The new namepublic Context getCompContext()
public Context getEnvContext()
public NamingContext getNamingContext()
public void lifecycleEvent(LifecycleEvent event)
lifecycleEvent
in interface LifecycleListener
event
- LifecycleEvent that has occurredpublic void containerEvent(ContainerEvent event)
containerEvent
in interface ContainerListener
event
- ContainerEvent that has occurredpublic void propertyChange(PropertyChangeEvent event)
propertyChange
in interface PropertyChangeListener
event
- The property change event that has occurredprotected ObjectName createObjectName(ContextResource resource) throws MalformedObjectNameException
ObjectName
for this
ContextResource
object.
resource
- The resource
MalformedObjectNameException
- if a name cannot be createdpublic void addEjb(ContextEjb ejb)
public void addEnvironment(ContextEnvironment env)
public void addLocalEjb(ContextLocalEjb localEjb)
public void addService(ContextService service)
public void addResource(ContextResource resource)
public void addResourceEnvRef(ContextResourceEnvRef resourceEnvRef)
public void addResourceLink(ContextResourceLink resourceLink)
public void removeEjb(String name)
public void removeEnvironment(String name)
public void removeLocalEjb(String name)
public void removeService(String name)
public void removeResource(String name)
public void removeResourceEnvRef(String name)
public void removeResourceLink(String name)
|
Apache Tomcat 7.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |