// NOTE - It seems that the Context for global JNDI resources
// is left in read-write mode, so we do not have to change it here
if (name.equals("ejb")) {
if (oldValue != null) {
ContextEjb ejb = (ContextEjb) oldValue;
if (ejb.getName() != null) {
removeEjb(ejb.getName());
}
}
if (newValue != null) {
ContextEjb ejb = (ContextEjb) newValue;
if (ejb.getName() != null) {
addEjb(ejb);
}
}
} else if (name.equals("environment")) {
if (oldValue != null) {
ContextEnvironment env = (ContextEnvironment) oldValue;
if (env.getName() != null) {
removeEnvironment(env.getName());
}
}
if (newValue != null) {
ContextEnvironment env = (ContextEnvironment) newValue;
if (env.getName() != null) {
addEnvironment(env);
}
}
} else if (name.equals("localEjb")) {
if (oldValue != null) {
ContextLocalEjb ejb = (ContextLocalEjb) oldValue;
if (ejb.getName() != null) {
removeLocalEjb(ejb.getName());
}
}
if (newValue != null) {
ContextLocalEjb ejb = (ContextLocalEjb) newValue;
if (ejb.getName() != null) {
addLocalEjb(ejb);
}
}
} else if (name.equals("resource")) {
if (oldValue != null) {