tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Colic" <>
Subject Help with refreshing servletContext please.
Date Wed, 18 Apr 2001 17:00:23 GMT

I am implementing a method of caching lists that I want available to all my
web users. I place lists in the servletcontext via:

    context.setAttribute("storeroomList",storerooms );

When the lists change I recall my cachelist method which gets the new data
and then put the list back into the session using the above line of code. I
thought that would replace the present list with the new one but
that is not occurring.

Is there another way I am supposed to be replacing attributes?

I thought about using removeAttribute followed by setAttribute but I am
worrying that someone might be accessing a page might need a list just as I
removing the list.

To test the problem I opened up a web page populated with my list and then
went to the database and changed some values in the list. My program then
caught these
changes, and repopulated the lists and then placed them in the context
again. I then opened up another window and the page was populated with the
old data.

Any help in this matter is appreciated.


View raw message