Holds and manages the naming resources defined in the J2EE Enterprise
Naming Context and their associated JNDI context.
addEjb
public void addEjb(ContextEjb ejb)
Add an EJB resource reference for this web application.
ejb
- New EJB resource reference
addEnvironment
public void addEnvironment(ContextEnvironment environment)
Add an environment entry for this web application.
environment
- New environment entry
addLocalEjb
public void addLocalEjb(ContextLocalEjb ejb)
Add a local EJB resource reference for this web application.
ejb
- New EJB resource reference
addMessageDestinationRef
public void addMessageDestinationRef(MessageDestinationRef mdr)
Add a message destination reference for this web application.
mdr
- New message destination reference
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.
listener
- The listener to add
addResource
public void addResource(ContextResource resource)
Add a resource reference for this web application.
resource
- New resource reference
addResourceEnvRef
public void addResourceEnvRef(String name,
String type)
Add a resource environment reference for this web application.
name
- The resource environment reference nametype
- The resource environment reference type
addResourceLink
public void addResourceLink(ContextResourceLink resourceLink)
Add a resource link for this web application.
resourceLink
- New resource link
addResourceParams
public void addResourceParams(ResourceParams resourceParameters)
Add resource parameters for this web application.
resourceParameters
- New resource parameters
exists
public boolean exists(String name)
Return true if the name specified already exists.
findEjb
public ContextEjb findEjb(String name)
Return the EJB resource reference with the specified name, if any;
otherwise, return null
.
name
- Name of the desired EJB resource reference
findEjbs
public ContextEjb[] findEjbs()
Return the defined EJB resource references for this application.
If there are none, a zero-length array is returned.
findEnvironment
public ContextEnvironment findEnvironment(String name)
Return the environment entry with the specified name, if any;
otherwise, return null
.
name
- Name of the desired environment entry
findEnvironments
public ContextEnvironment[] findEnvironments()
Return the set of defined environment entries for this web
application. If none have been defined, a zero-length array
is returned.
findLocalEjb
public ContextLocalEjb findLocalEjb(String name)
Return the local EJB resource reference with the specified name, if any;
otherwise, return null
.
name
- Name of the desired EJB resource reference
findLocalEjbs
public ContextLocalEjb[] findLocalEjbs()
Return the defined local EJB resource references for this application.
If there are none, a zero-length array is returned.
findMessageDestinationRef
public MessageDestinationRef findMessageDestinationRef(String name)
Return the message destination reference with the specified name,
if any; otherwise, return null
.
name
- Name of the desired message destination reference
findMessageDestinationRefs
public MessageDestinationRef[] findMessageDestinationRefs()
Return the defined message destination references for this application.
If there are none, a zero-length array is returned.
findResource
public ContextResource findResource(String name)
Return the resource reference with the specified name, if any;
otherwise return null
.
name
- Name of the desired resource reference
findResourceEnvRef
public String findResourceEnvRef(String name)
Return the resource environment reference type for the specified
name, if any; otherwise return null
.
name
- Name of the desired resource environment reference
findResourceEnvRefs
public String[] findResourceEnvRefs()
Return the set of resource environment reference names for this
web application. If none have been specified, a zero-length
array is returned.
findResourceLink
public ContextResourceLink findResourceLink(String name)
Return the resource link with the specified name, if any;
otherwise return null
.
name
- Name of the desired resource link
findResourceLinks
public ContextResourceLink[] findResourceLinks()
Return the defined resource links for this application. If
none have been defined, a zero-length array is returned.
findResourceParams
public ResourceParams[] findResourceParams()
Return the resource parameters with the specified name, if any;
otherwise return null
.
findResourceParams
public ResourceParams findResourceParams(String name)
Return the resource parameters with the specified name, if any;
otherwise return null
.
findResources
public ContextResource[] findResources()
Return the defined resource references for this application. If
none have been defined, a zero-length array is returned.
getContainer
public Object getContainer()
Get the container with which the naming resources are associated.
removeEjb
public void removeEjb(String name)
Remove any EJB resource reference with the specified name.
name
- Name of the EJB resource reference to remove
removeEnvironment
public void removeEnvironment(String name)
Remove any environment entry with the specified name.
name
- Name of the environment entry to remove
removeLocalEjb
public void removeLocalEjb(String name)
Remove any local EJB resource reference with the specified name.
name
- Name of the EJB resource reference to remove
removeMessageDestinationRef
public void removeMessageDestinationRef(String name)
Remove any message destination reference with the specified name.
name
- Name of the message destination resource reference to remove
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.
listener
- The listener to remove
removeResource
public void removeResource(String name)
Remove any resource reference with the specified name.
name
- Name of the resource reference to remove
removeResourceEnvRef
public void removeResourceEnvRef(String name)
Remove any resource environment reference with the specified name.
name
- Name of the resource environment reference to remove
removeResourceLink
public void removeResourceLink(String name)
Remove any resource link with the specified name.
name
- Name of the resource link to remove
removeResourceParams
public void removeResourceParams(String name)
Remove any resource parameters with the specified name.
name
- Name of the resource parameters to remove
setContainer
public void setContainer(Object container)
Set the container with which the naming resources are associated.