Methods Summary |
---|
public void | addEjb(ContextEjb ejb)Add an EJB resource reference for this web application.
if (entries.containsKey(ejb.getName())) {
return;
} else {
entries.put(ejb.getName(), ejb.getType());
}
synchronized (ejbs) {
ejb.setNamingResources(this);
ejbs.put(ejb.getName(), ejb);
}
support.firePropertyChange("ejb", null, ejb);
|
public void | addEnvironment(ContextEnvironment environment)Add an environment entry for this web application.
if (entries.containsKey(environment.getName())) {
return;
} else {
entries.put(environment.getName(), environment.getType());
}
synchronized (envs) {
environment.setNamingResources(this);
envs.put(environment.getName(), environment);
}
support.firePropertyChange("environment", null, environment);
|
public void | addLocalEjb(ContextLocalEjb ejb)Add a local EJB resource reference for this web application.
if (entries.containsKey(ejb.getName())) {
return;
} else {
entries.put(ejb.getName(), ejb.getType());
}
synchronized (localEjbs) {
ejb.setNamingResources(this);
localEjbs.put(ejb.getName(), ejb);
}
support.firePropertyChange("localEjb", null, ejb);
|
public void | addMessageDestinationRef(MessageDestinationRef mdr)Add a message destination reference for this web application.
if (entries.containsKey(mdr.getName())) {
return;
} else {
entries.put(mdr.getName(), mdr.getType());
}
synchronized (mdrs) {
mdr.setNamingResources(this);
mdrs.put(mdr.getName(), mdr);
}
support.firePropertyChange("messageDestinationRef", null, mdr);
|
public void | addPropertyChangeListener(java.beans.PropertyChangeListener listener)Add a property change listener to this component.
support.addPropertyChangeListener(listener);
|
public void | addResource(ContextResource resource)Add a resource reference for this web application.
if (entries.containsKey(resource.getName())) {
return;
} else {
entries.put(resource.getName(), resource.getType());
}
synchronized (resources) {
resource.setNamingResources(this);
resources.put(resource.getName(), resource);
}
support.firePropertyChange("resource", null, resource);
|
public void | addResourceEnvRef(java.lang.String name, java.lang.String type)Add a resource environment reference for this web application.
if (entries.containsKey(name)) {
return;
} else {
entries.put(name, type);
}
synchronized (resourceEnvRefs) {
resourceEnvRefs.put(name, type);
}
support.firePropertyChange("resourceEnvRef", null,
name + ":" + type);
|
public void | addResourceLink(ContextResourceLink resourceLink)Add a resource link for this web application.
if (entries.containsKey(resourceLink.getName())) {
return;
} else {
Object value = resourceLink.getType();
if (value == null) {
value = "";
}
entries.put(resourceLink.getName(), value);
}
synchronized (resourceLinks) {
resourceLink.setNamingResources(this);
resourceLinks.put(resourceLink.getName(), resourceLink);
}
support.firePropertyChange("resourceLink", null, resourceLink);
|
public void | addResourceParams(ResourceParams resourceParameters)Add resource parameters for this web application.
synchronized (resourceParams) {
if (resourceParams.containsKey(resourceParameters.getName())) {
return;
}
resourceParameters.setNamingResources(this);
resourceParams.put(resourceParameters.getName(),
resourceParameters);
}
support.firePropertyChange("resourceParams", null, resourceParameters);
|
public boolean | exists(java.lang.String name)Return true if the name specified already exists.
return (entries.containsKey(name));
|
public ContextEjb | findEjb(java.lang.String name)Return the EJB resource reference with the specified name, if any;
otherwise, return null .
synchronized (ejbs) {
return ((ContextEjb) ejbs.get(name));
}
|
public ContextEjb[] | findEjbs()Return the defined EJB resource references for this application.
If there are none, a zero-length array is returned.
synchronized (ejbs) {
ContextEjb results[] = new ContextEjb[ejbs.size()];
return ((ContextEjb[]) ejbs.values().toArray(results));
}
|
public ContextEnvironment | findEnvironment(java.lang.String name)Return the environment entry with the specified name, if any;
otherwise, return null .
synchronized (envs) {
return ((ContextEnvironment) envs.get(name));
}
|
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.
synchronized (envs) {
ContextEnvironment results[] = new ContextEnvironment[envs.size()];
return ((ContextEnvironment[]) envs.values().toArray(results));
}
|
public ContextLocalEjb | findLocalEjb(java.lang.String name)Return the local EJB resource reference with the specified name, if any;
otherwise, return null .
synchronized (localEjbs) {
return ((ContextLocalEjb) localEjbs.get(name));
}
|
public ContextLocalEjb[] | findLocalEjbs()Return the defined local EJB resource references for this application.
If there are none, a zero-length array is returned.
synchronized (localEjbs) {
ContextLocalEjb results[] = new ContextLocalEjb[localEjbs.size()];
return ((ContextLocalEjb[]) localEjbs.values().toArray(results));
}
|
public MessageDestinationRef | findMessageDestinationRef(java.lang.String name)Return the message destination reference with the specified name,
if any; otherwise, return null .
synchronized (mdrs) {
return ((MessageDestinationRef) mdrs.get(name));
}
|
public MessageDestinationRef[] | findMessageDestinationRefs()Return the defined message destination references for this application.
If there are none, a zero-length array is returned.
synchronized (mdrs) {
MessageDestinationRef results[] =
new MessageDestinationRef[mdrs.size()];
return ((MessageDestinationRef[]) mdrs.values().toArray(results));
}
|
public ContextResource | findResource(java.lang.String name)Return the resource reference with the specified name, if any;
otherwise return null .
synchronized (resources) {
return ((ContextResource) resources.get(name));
}
|
public java.lang.String | findResourceEnvRef(java.lang.String name)Return the resource environment reference type for the specified
name, if any; otherwise return null .
synchronized (resourceEnvRefs) {
return ((String) resourceEnvRefs.get(name));
}
|
public java.lang.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.
synchronized (resourceEnvRefs) {
String results[] = new String[resourceEnvRefs.size()];
return ((String[]) resourceEnvRefs.keySet().toArray(results));
}
|
public ContextResourceLink | findResourceLink(java.lang.String name)Return the resource link with the specified name, if any;
otherwise return null .
synchronized (resourceLinks) {
return ((ContextResourceLink) resourceLinks.get(name));
}
|
public ContextResourceLink[] | findResourceLinks()Return the defined resource links for this application. If
none have been defined, a zero-length array is returned.
synchronized (resourceLinks) {
ContextResourceLink results[] =
new ContextResourceLink[resourceLinks.size()];
return ((ContextResourceLink[]) resourceLinks.values()
.toArray(results));
}
|
public ResourceParams | findResourceParams(java.lang.String name)Return the resource parameters with the specified name, if any;
otherwise return null .
synchronized (resourceParams) {
return ((ResourceParams) resourceParams.get(name));
}
|
public ResourceParams[] | findResourceParams()Return the resource parameters with the specified name, if any;
otherwise return null .
synchronized (resourceParams) {
ResourceParams results[] =
new ResourceParams[resourceParams.size()];
return ((ResourceParams[]) resourceParams.values()
.toArray(results));
}
|
public ContextResource[] | findResources()Return the defined resource references for this application. If
none have been defined, a zero-length array is returned.
synchronized (resources) {
ContextResource results[] = new ContextResource[resources.size()];
return ((ContextResource[]) resources.values().toArray(results));
}
|
public java.lang.Object | getContainer()Get the container with which the naming resources are associated.
// ------------------------------------------------------------- Properties
return container;
|
public void | removeEjb(java.lang.String name)Remove any EJB resource reference with the specified name.
entries.remove(name);
ContextEjb ejb = null;
synchronized (ejbs) {
ejb = (ContextEjb) ejbs.remove(name);
}
if (ejb != null) {
support.firePropertyChange("ejb", ejb, null);
ejb.setNamingResources(null);
}
|
public void | removeEnvironment(java.lang.String name)Remove any environment entry with the specified name.
entries.remove(name);
ContextEnvironment environment = null;
synchronized (envs) {
environment = (ContextEnvironment) envs.remove(name);
}
if (environment != null) {
support.firePropertyChange("environment", environment, null);
environment.setNamingResources(null);
}
|
public void | removeLocalEjb(java.lang.String name)Remove any local EJB resource reference with the specified name.
entries.remove(name);
ContextLocalEjb localEjb = null;
synchronized (localEjbs) {
localEjb = (ContextLocalEjb) ejbs.remove(name);
}
if (localEjb != null) {
support.firePropertyChange("localEjb", localEjb, null);
localEjb.setNamingResources(null);
}
|
public void | removeMessageDestinationRef(java.lang.String name)Remove any message destination reference with the specified name.
entries.remove(name);
MessageDestinationRef mdr = null;
synchronized (mdrs) {
mdr = (MessageDestinationRef) mdrs.remove(name);
}
if (mdr != null) {
support.firePropertyChange("messageDestinationRef",
mdr, null);
mdr.setNamingResources(null);
}
|
public void | removePropertyChangeListener(java.beans.PropertyChangeListener listener)Remove a property change listener from this component.
support.removePropertyChangeListener(listener);
|
public void | removeResource(java.lang.String name)Remove any resource reference with the specified name.
entries.remove(name);
ContextResource resource = null;
synchronized (resources) {
resource = (ContextResource) resources.remove(name);
}
if (resource != null) {
support.firePropertyChange("resource", resource, null);
resource.setNamingResources(null);
}
|
public void | removeResourceEnvRef(java.lang.String name)Remove any resource environment reference with the specified name.
entries.remove(name);
String type = null;
synchronized (resourceEnvRefs) {
type = (String) resourceEnvRefs.remove(name);
}
if (type != null) {
support.firePropertyChange("resourceEnvRef",
name + ":" + type, null);
}
|
public void | removeResourceLink(java.lang.String name)Remove any resource link with the specified name.
entries.remove(name);
ContextResourceLink resourceLink = null;
synchronized (resourceLinks) {
resourceLink = (ContextResourceLink) resourceLinks.remove(name);
}
if (resourceLink != null) {
support.firePropertyChange("resourceLink", resourceLink, null);
resourceLink.setNamingResources(null);
}
|
public void | removeResourceParams(java.lang.String name)Remove any resource parameters with the specified name.
ResourceParams resourceParameters = null;
synchronized (resourceParams) {
resourceParameters = (ResourceParams) resourceParams.remove(name);
}
if (resourceParameters != null) {
support.firePropertyChange("resourceParams", resourceParameters,
null);
resourceParameters.setNamingResources(null);
}
|
public void | setContainer(java.lang.Object container)Set the container with which the naming resources are associated.
this.container = container;
|