public class NamingContextListener extends Object implements LifecycleListener, ContainerListener, PropertyChangeListener
| Modifier and Type | Field and Description |
|---|---|
protected Context |
compCtx
Comp context.
|
protected Object |
container
Associated container.
|
protected int |
debug
Debugging level.
|
protected Context |
envCtx
Env context.
|
protected boolean |
initialized
Initialized flag.
|
protected String |
name
Name of the associated naming context.
|
protected NamingContext |
namingContext
Associated JNDI context.
|
protected NamingResources |
namingResources
Associated naming resources.
|
| Constructor and Description |
|---|
NamingContextListener()
Create a new naming context listener.
|
| Modifier and Type | Method and Description |
|---|---|
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(String name,
String type)
Set the specified resources in the naming context.
|
void |
addResourceLink(ContextResourceLink resourceLink)
Set the specified resource link in the naming context.
|
void |
containerEvent(ContainerEvent event)
Acknowledge the occurrence of the specified event.
|
int |
getDebug()
Return the "debug" property.
|
String |
getName()
Return the "name" property.
|
NamingContext |
getNamingContext()
Return the associated naming context.
|
void |
lifecycleEvent(LifecycleEvent event)
Acknowledge the occurrence of the specified event.
|
protected void |
log(String message)
Log the specified message to our current Logger (if any).
|
protected void |
log(String message,
Throwable t)
Log the specified message and exception to our current Logger
(if any).
|
protected String |
logName()
Return the abbreviated name of this container for logging messsages
|
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 |
setDebug(int debug)
Set the "debug" property.
|
void |
setName(String name)
Set the "name" property.
|
protected String name
protected Object container
protected int debug
protected boolean initialized
protected NamingResources namingResources
protected NamingContext namingContext
protected Context compCtx
protected Context envCtx
public NamingContextListener()
public int getDebug()
public void setDebug(int debug)
debug - The new debug levelpublic String getName()
public void setName(String name)
name - The new namepublic NamingContext getNamingContext()
public void lifecycleEvent(LifecycleEvent event)
lifecycleEvent in interface LifecycleListenerevent - LifecycleEvent that has occurredpublic void containerEvent(ContainerEvent event)
containerEvent in interface ContainerListenerevent - ContainerEvent that has occurredpublic void propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListenerevent - The property change event that has occurredpublic void addEjb(ContextEjb ejb)
public void addEnvironment(ContextEnvironment env)
public void addLocalEjb(ContextLocalEjb localEjb)
public void addResource(ContextResource resource)
public void addResourceEnvRef(String name, String type)
public void addResourceLink(ContextResourceLink resourceLink)
public void removeEjb(String name)
public void removeEnvironment(String name)
public void removeLocalEjb(String name)
public void removeResource(String name)
public void removeResourceEnvRef(String name)
public void removeResourceLink(String name)
protected void log(String message)
message - Message to be loggedprotected void log(String message, Throwable t)
message - Message to be loggedt - Related exceptionprotected String logName()
Copyright © 2017. All rights reserved.