addResourceEnvRef(update.substring(0, colon),
update.substring(colon + 1));
}
} else if (name.equals("resourceLink")) {
if (oldValue != null) {
ContextResourceLink rl = (ContextResourceLink) oldValue;
if (rl.getName() != null) {
removeResourceLink(rl.getName());
}
}
if (newValue != null) {
ContextResourceLink rl = (ContextResourceLink) newValue;
if (rl.getName() != null) {
addResourceLink(rl);
}
}
} else if (name.equals("resourceParams")) {
String resourceParamsName = null;
ResourceParams rp = null;
if (oldValue != null) {
rp = (ResourceParams) oldValue;
}
if (newValue != null) {
rp = (ResourceParams) newValue;
}
if (rp != null) {
resourceParamsName = rp.getName();
}
if (resourceParamsName != null) {
ContextEjb ejb = namingResources.findEjb(resourceParamsName);
if (ejb != null) {
removeEjb(resourceParamsName);
addEjb(ejb);
}
ContextResource resource =
namingResources.findResource(resourceParamsName);
if (resource != null) {
removeResource(resourceParamsName);
addResource(resource);
}
String resourceEnvRefValue =
namingResources.findResourceEnvRef(resourceParamsName);
if (resourceEnvRefValue != null) {
removeResourceEnvRef(resourceParamsName);
addResourceEnvRef(resourceParamsName, resourceEnvRefValue);
}
ContextResourceLink resourceLink =
namingResources.findResourceLink(resourceParamsName);
if (resourceLink != null) {
removeResourceLink(resourceParamsName);
addResourceLink(resourceLink);
}