Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SevletContext not updating an existing attribute

843842May 20 2010 — edited May 24 2010
ServletContext attribute is not getting updated once ServletContext is initialized with the attribute....

Application server is Weblogic 10.3.0.0

I have a class which implements javax.servlet.ServletContextListener.

I am initializing the context as given below

public void contextInitialized(ServletContextEvent servletContextEvent) {
context = servletContextEvent.getServletContext();

I have one more method which is as below

public void updateContext() {
try {
loadRefDataManager.retrieveAllRefData();
context.setAttribute("bankParams", loadRefDataManager.retrieveBankParams().get(0));
log.info("BankParams Context Parameter:::: " + context.getAttribute("bankParams"));
} catch (WMException e) {
log.warn("Exception occured in ContextListener ::::: " + e.getCause());
throw e;
}
}

On calling the abobve method the "bankParams" attribute is not getting updated in Weblogic 10.3.0.0

while it is taking place in tomcat 6.0
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2010
Added on May 20 2010
2 comments
168 views