if (me != null) {
for (int n = 0; n < this.contextAttributeListeners.length; n++) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getLoader());
this.contextAttributeListeners[n].attributeReplaced(
new ServletContextAttributeEvent(this, name, me));
Thread.currentThread().setContextClassLoader(cl);
}
} else {
for (int n = 0; n < this.contextAttributeListeners.length; n++) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getLoader());
this.contextAttributeListeners[n].attributeAdded(
new ServletContextAttributeEvent(this, name, object));
Thread.currentThread().setContextClassLoader(cl);
}
}
}
}