| Method from org.apache.catalina.deploy.NamingResources Detail: |
public void addEjb(ContextEjb ejb) {
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);
}
Add an EJB resource reference for this web application. |
public void addEnvironment(ContextEnvironment environment) {
if (entries.containsKey(environment.getName())) {
ContextEnvironment ce = findEnvironment(environment.getName());
ContextResourceLink rl = findResourceLink(environment.getName());
if (ce != null) {
if (ce.getOverride()) {
removeEnvironment(environment.getName());
} else {
return;
}
} else if (rl != null) {
// Link. Need to look at the global resources
NamingResources global =
ServerFactory.getServer().getGlobalNamingResources();
if (global.findEnvironment(rl.getGlobal()) != null) {
if (global.findEnvironment(rl.getGlobal()).getOverride()) {
removeResourceLink(environment.getName());
} else {
return;
}
}
} else {
// It exists but it isn't an env or a res link...
return;
}
}
entries.put(environment.getName(), environment.getType());
synchronized (envs) {
environment.setNamingResources(this);
envs.put(environment.getName(), environment);
}
support.firePropertyChange("environment", null, environment);
}
Add an environment entry for this web application. |
public void addLocalEjb(ContextLocalEjb ejb) {
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);
}
Add a local EJB resource reference for this web application. |
public void addMessageDestinationRef(MessageDestinationRef mdr) {
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);
}
Add a message destination reference for this web application. |
public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
}
Add a property change listener to this component. |
public void addResource(ContextResource resource) {
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);
}
Add a resource reference for this web application. |
public void addResourceEnvRef(ContextResourceEnvRef resource) {
if (entries.containsKey(resource.getName())) {
return;
} else {
entries.put(resource.getName(), resource.getType());
}
synchronized (localEjbs) {
resource.setNamingResources(this);
resourceEnvRefs.put(resource.getName(), resource);
}
support.firePropertyChange("resourceEnvRef", null, resource);
}
Add a resource environment reference for this web application. |
public void addResourceLink(ContextResourceLink resourceLink) {
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);
}
Add a resource link for this web application. |
public void addService(ContextService service) {
if (entries.containsKey(service.getName())) {
return;
} else {
Object value = service.getType();
if (value == null) {
value = "";
}
entries.put(service.getName(), value);
}
synchronized (services) {
service.setNamingResources(this);
services.put(service.getName(), service);
}
support.firePropertyChange("service", null, service);
}
Add a web service reference for this web application. |
public boolean exists(String name) {
return (entries.containsKey(name));
}
Return true if the name specified already exists. |
public ContextEjb findEjb(String name) {
synchronized (ejbs) {
return ((ContextEjb) ejbs.get(name));
}
}
Return the EJB resource reference with the specified name, if any;
otherwise, return null. |
public ContextEjb[] findEjbs() {
synchronized (ejbs) {
ContextEjb results[] = new ContextEjb[ejbs.size()];
return ((ContextEjb[]) ejbs.values().toArray(results));
}
}
Return the defined EJB resource references for this application.
If there are none, a zero-length array is returned. |
public ContextEnvironment findEnvironment(String name) {
synchronized (envs) {
return ((ContextEnvironment) envs.get(name));
}
}
Return the environment entry with the specified name, if any;
otherwise, return null. |
public ContextEnvironment[] findEnvironments() {
synchronized (envs) {
ContextEnvironment results[] = new ContextEnvironment[envs.size()];
return ((ContextEnvironment[]) envs.values().toArray(results));
}
}
Return the set of defined environment entries for this web
application. If none have been defined, a zero-length array
is returned. |
public ContextLocalEjb findLocalEjb(String name) {
synchronized (localEjbs) {
return ((ContextLocalEjb) localEjbs.get(name));
}
}
Return the local EJB resource reference with the specified name, if any;
otherwise, return null. |
public ContextLocalEjb[] findLocalEjbs() {
synchronized (localEjbs) {
ContextLocalEjb results[] = new ContextLocalEjb[localEjbs.size()];
return ((ContextLocalEjb[]) localEjbs.values().toArray(results));
}
}
Return the defined local EJB resource references for this application.
If there are none, a zero-length array is returned. |
public MessageDestinationRef findMessageDestinationRef(String name) {
synchronized (mdrs) {
return ((MessageDestinationRef) mdrs.get(name));
}
}
Return the message destination reference with the specified name,
if any; otherwise, return null. |
public MessageDestinationRef[] findMessageDestinationRefs() {
synchronized (mdrs) {
MessageDestinationRef results[] =
new MessageDestinationRef[mdrs.size()];
return ((MessageDestinationRef[]) mdrs.values().toArray(results));
}
}
Return the defined message destination references for this application.
If there are none, a zero-length array is returned. |
public ContextResource findResource(String name) {
synchronized (resources) {
return ((ContextResource) resources.get(name));
}
}
Return the resource reference with the specified name, if any;
otherwise return null. |
public ContextResourceEnvRef findResourceEnvRef(String name) {
synchronized (resourceEnvRefs) {
return ((ContextResourceEnvRef) resourceEnvRefs.get(name));
}
}
Return the resource environment reference type for the specified
name, if any; otherwise return null. |
public ContextResourceEnvRef[] findResourceEnvRefs() {
synchronized (resourceEnvRefs) {
ContextResourceEnvRef results[] = new ContextResourceEnvRef[resourceEnvRefs.size()];
return ((ContextResourceEnvRef[]) resourceEnvRefs.values().toArray(results));
}
}
Return the set of resource environment reference names for this
web application. If none have been specified, a zero-length
array is returned. |
public ContextResourceLink findResourceLink(String name) {
synchronized (resourceLinks) {
return ((ContextResourceLink) resourceLinks.get(name));
}
}
Return the resource link with the specified name, if any;
otherwise return null. |
public ContextResourceLink[] findResourceLinks() {
synchronized (resourceLinks) {
ContextResourceLink results[] =
new ContextResourceLink[resourceLinks.size()];
return ((ContextResourceLink[]) resourceLinks.values()
.toArray(results));
}
}
Return the defined resource links for this application. If
none have been defined, a zero-length array is returned. |
public ContextResource[] findResources() {
synchronized (resources) {
ContextResource results[] = new ContextResource[resources.size()];
return ((ContextResource[]) resources.values().toArray(results));
}
}
Return the defined resource references for this application. If
none have been defined, a zero-length array is returned. |
public ContextService findService(String name) {
synchronized (services) {
return ((ContextService) services.get(name));
}
}
Return the web service reference for the specified
name, if any; otherwise return null. |
public ContextService[] findServices() {
synchronized (services) {
ContextService results[] = new ContextService[services.size()];
return ((ContextService[]) services.values().toArray(results));
}
}
Return the defined web service references for this application. If
none have been defined, a zero-length array is returned. |
public Object getContainer() {
// ------------------------------------------------------------- Properties
return container;
}
Get the container with which the naming resources are associated. |
public ContextTransaction getTransaction() {
return transaction;
}
Get the transaction object. |
public void removeEjb(String 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);
}
}
Remove any EJB resource reference with the specified name. |
public void removeEnvironment(String 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);
}
}
Remove any environment entry with the specified name. |
public void removeLocalEjb(String 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);
}
}
Remove any local EJB resource reference with the specified name. |
public void removeMessageDestinationRef(String 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);
}
}
Remove any message destination reference with the specified name. |
public void removePropertyChangeListener(PropertyChangeListener listener) {
support.removePropertyChangeListener(listener);
}
Remove a property change listener from this component. |
public void removeResource(String 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);
}
}
Remove any resource reference with the specified name. |
public void removeResourceEnvRef(String name) {
entries.remove(name);
String type = null;
synchronized (resourceEnvRefs) {
type = (String) resourceEnvRefs.remove(name);
}
if (type != null) {
support.firePropertyChange("resourceEnvRef",
name + ":" + type, null);
}
}
Remove any resource environment reference with the specified name. |
public void removeResourceLink(String 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);
}
}
Remove any resource link with the specified name. |
public void removeService(String name) {
entries.remove(name);
ContextService service = null;
synchronized (services) {
service = (ContextService) services.remove(name);
}
if (service != null) {
support.firePropertyChange("service", service, null);
service.setNamingResources(null);
}
}
Remove any web service reference with the specified name. |
public void setContainer(Object container) {
this.container = container;
}
Set the container with which the naming resources are associated. |
public void setTransaction(ContextTransaction transaction) {
this.transaction = transaction;
}
Set the transaction object. |