DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29093>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29093

When reloading context IllegalStateException is not catched





------- Additional Comments From [EMAIL PROTECTED]  2004-06-07 09:36 -------
Yes, I agree, I have to find a reason of this behavior. But please imagine the 
situation: server is loaded with 500 – 1000 sessions or even more. And there is 
a necessity of reloading context. And if this situation occurs, application 
will not be available for several minutes, because the only thing we can do – 
restart tomcat.

It is very convenient – possibility of context reload, but now we afraid reload 
context because if this happens, it is the same as tomcat restart.


I am sorry, I do not know tomcat structure well enough. I may be wrong, but I 
have a hypothesis how this can happen.

There is background thread that calls StoreBase.processExpires() method. This 
method walks through sessions and it may call StandardSession.recycle() or 
StandardSession.expire(). Both of this methods may set the following fields of 
Session object:

expiring         to          false;
isValid           to          false;
accessCount   to         0;



Suppose, we reloading context - in StandardManager.doUnload we walk through 
sessions and call writeObjectData on each session, which will call writeObject 
method. It calls removeAttribute method, which may throw a runtime exception, 
if isValid() == false.

isValid() == false 

if 

expiring == false;
isValid  == false;
accessCount == 0;

Suppose, at the same time background thread sets this fields to

expiring = false;
isValid  = false;
accessCount = 0;

Than we will have this situation.

I do not know is this hypothesis true or not. I may be wrong, but it is 
important for us that is why I am moving a suggestion.

Could you please tell your opinion?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to