DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-03-08 Thread bugzilla
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=33589.
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=33589


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |




--- Additional Comments From [EMAIL PROTECTED]  2005-03-08 18:21 ---
I tried what you suggest me (hack my code to wait more).

To do so, I implement a MotherServlet and all the servlets inherit to it.
MotherServlet below :

public abstract class MotherServlet extends HttpServlet
{
  private static final Object lock = new Object();
  private static int nbActifsThreads = 0;
...
  protected void service(HttpServletRequest request, HttpServletResponse
response) throws IOException, ServletExcepti
on
  {
synchronized (lock) { nbActifsThreads++; }
try {
  super.service(request, response);
}
finally {
  try {
response.flushBuffer();
  }
  catch (IOException e) {
log( exception, e );
  }
}
synchronized (lock) { nbActifsThreads--; }
  }

  public synchronized void destroy()
  {
while (nbActifsThreads 0) {
  try { Thread.sleep(100); } catch (Exception e) {}
}
super.destroy();
  }
}

It works for me.

But, now, the problem is :
If I want to force a stop Context, how to do it ?
The destroy doesn't know if I want a graceful stop or a force stop ...


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-03-08 Thread bugzilla
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=33589.
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=33589


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2005-03-08 18:32 ---
Either way it's not a Tomcat issue, it's your problem, please don't reopen the 
issue.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-02-17 Thread bugzilla
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=33589.
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=33589





--- Additional Comments From [EMAIL PROTECTED]  2005-02-17 11:47 ---
I agree : you are free to refuse any new feature.

I read your comment but I thought that, instead of implementing a wait in the
destroy of all my servlets, it would be better to solve this within the
application server.

use of the pause operation on the connectors : what do you mean ? (I find
nothing in the docs :-( 
I use apache with mod_jk for load_balance and failover but I don't know the
pause operation...Do you have a doc link for this ?


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-02-16 Thread bugzilla
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=33589.
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=33589


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|enhancement |major
  Component|Catalina|Webapps:Manager
 OS/Version|All |Linux
   Platform|All |PC




--- Additional Comments From [EMAIL PROTECTED]  2005-02-16 10:11 ---
There are 2 sorts of stop Context :

1- When you want to stop a context because it has possibly a problem, the actual
stop context is good because you want to force the stop as quickly as possible
and you don't want to wait for anything.
2- When you to stop the context because you want to install a new WAR, I'd like
my clients don't know about it. So, I'd want a stop light (with waiting for
running threads). The service is not interrupted because, while I install my new
WAR, mod_jk balance the requests on the other(s) tomcat. And when I am ready, I
start my context and stop light the others.

The 2nd case is not resolved with a reload, because, when I install my new WAR,
(in default localhost with unpackWARs=true) my context is not the new One.
So I need a stop...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-02-16 Thread bugzilla
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=33589.
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=33589


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX




--- Additional Comments From [EMAIL PROTECTED]  2005-02-16 10:20 ---
Did you actually read my comment ?
- threads will have to exit your webapp while it's gone (when stopping, Tomcat
waits a little; as I've said, you can hack the code a little to wait more, or
wait forever if you want to)
- request processing will fail while your webapp is being reloaded/redeployed

If you want QoS, you need two Tomcat instances, and make use of the pause
operation on the connectors.

Judging by your latest comment, this doesn't seem it will go anywehere, so I'm
closing the bug. You are free to ask for features, and we are free to refuse to
do it ;)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-02-15 Thread bugzilla
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=33589.
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=33589





--- Additional Comments From [EMAIL PROTECTED]  2005-02-15 18:19 ---
No.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-02-15 Thread bugzilla
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=33589.
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=33589





--- Additional Comments From [EMAIL PROTECTED]  2005-02-15 18:30 ---
Clarification: yes, the threads will be stopped when stopping the webapp
(obviously, they are not, but after the classloader stops doing anything, your
requests are basically dead). You just have the option of hacking a little in
the source to wait more.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-02-15 Thread bugzilla
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=33589.
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=33589


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|major   |enhancement
  Component|Webapps:Manager |Catalina
 OS/Version|Linux   |All
   Platform|PC  |All




--- Additional Comments From [EMAIL PROTECTED]  2005-02-15 20:32 ---
Just fixing the severity and a couple of other flags.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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



DO NOT REPLY [Bug 33589] - stop a context without interrupting its running threads

2005-02-15 Thread bugzilla
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=33589.
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=33589





--- Additional Comments From [EMAIL PROTECTED]  2005-02-15 20:41 ---
This is a fairly terrible request.  A context stop is a significant 
administrative event, and clearing all the resources associated with a context 
upon a stop is imperative.  We hear complaints all the time that resources 
aren't cleaned up quickly or efficiently enough.

I'll give other developers ample time to express opinions and/or suggest 
patches for this, but if nothing is done for a few weeks, I'll close this 
issue as WONTFIX.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

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