DO NOT REPLY [Bug 29093] - When reloading context IllegalStateException is not catched

2004-06-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2004-06-10 23:50 ---
I would probably -1 catching this exception, as I'd like tomcat's lifecycle 
handling code to handle lifecycle exceptions only, and leave other things 
higher up the hierarchy.

If you really need this functionality, at least for the time being, I suggest 
extending StandardContext with your own context.  This is why Tomcat is open-
source and why we have the className attribute on the Context element: it's 
trivial to extend and customize.  If over time you can't find a cause and are 
convinced your fix is essential to the global tomcat community, we can reopen 
this bug and/or re-discuss this issue on the tomcat-dev list.  So for now I'm 
closing it.  If you do customize StandardContext and it works, please post 
your findings to tomcat-user, to see if others find it helpful.

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



DO NOT REPLY [Bug 29093] - When reloading context IllegalStateException is not catched

2004-06-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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]



DO NOT REPLY [Bug 29093] - When reloading context IllegalStateException is not catched

2004-06-07 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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 07:27 ---
Ok, I'll comment: I think not, this case requires user intervention. How about
trying to find the cause of the exception instead ? (which I don't get, but was
the only reason why I didn't close your bug as INVALID in the first place)

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



DO NOT REPLY [Bug 29093] - When reloading context IllegalStateException is not catched

2004-06-06 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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 05:05 ---
Could somebody please comment this bug? It was opened two weeks ago ...

I think, code should be changed to:

try {
stop();
} catch (LifecycleException e) {
log.error(sm.getString("standardContext.stoppingContext"), e);
} catch (IllegalStateException illegalStateException) {
}

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