stop context properly or in a forced way

2005-03-09 Thread Lionel Farbos
Hi all,

When I want to upgrade my webapp,
I want to stop my context without interrupting its running threads.
But, for exploitation needs, 
I can want to force the stop of my context.

For this 2 needs, Tomcat provide only one solution : within the manager, a 
force stop context.
And they don't want to provide another solution for the proper stop context 
(bug 33589 WONTFIX).

So, I can hack my code in order to have a proper stop context (see the 
MotherSerlvet proposed in bug 33589),
BUT now, I don't know HOW TO hack my code for the force stop context ... :-(

Any suggest would be appreciated.

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



Re: stop context properly or in a forced way

2005-03-09 Thread Lionel Farbos
I receive no response,
so I think there is, for now, no solution without a patch of Tomcat (for 
example : new Stop Context in Tomcat Manager + info added in the 
ServletContext...).

But I am alone for this needs ?
Or a lot of people need this but they don't know how to do because it is not 
possible with Tomcat ?

On Wed, 9 Mar 2005 10:59:57 +0100
Lionel Farbos [EMAIL PROTECTED] wrote:

 Hi all,
 
 When I want to upgrade my webapp,
 I want to stop my context without interrupting its running threads.
 But, for exploitation needs, 
 I can want to force the stop of my context.
 
 For this 2 needs, Tomcat provide only one solution : within the manager, a 
 force stop context.
 And they don't want to provide another solution for the proper stop context 
 (bug 33589 WONTFIX).
 
 So, I can hack my code in order to have a proper stop context (see the 
 MotherSerlvet proposed in bug 33589),
 BUT now, I don't know HOW TO hack my code for the force stop context ... :-(
 
 Any suggest would be appreciated.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: stop context properly

2005-02-10 Thread Lionel Farbos
No response, so nobody knows how to ?...
Perhaps this feature doesn't exist in TC4.1?...

Is this feature (stop context without interrupt running threads) available in 
TC5.0 or TC5.5 ?




On Wed, 9 Feb 2005 19:36:50 +0100
Lionel Farbos [EMAIL PROTECTED] wrote:

 Hi all,
 
 I work with Tomcat 4.1.31, with the Manager, and 
 I search how to stop a context without interrupting its running threads ?
 
 When I test a stop on my Context (/testServlet), 
 I see a log like this :
 
 2005-02-08 17:37:16 HTMLManager: stop: Stopping web application at 
 '/testServlet'
 2005-02-08 17:37:16 StandardHost[localhost]: standardHost.stop /testServlet
 2005-02-08 17:37:16 StandardWrapper[/testServlet:Fille4Servlet]: Waiting for 
 1 instance(s) to be deallocated
 2005-02-08 17:37:17 Fille4Servlet: destroy deFille4Servlet==0
 
 And all the servlets in my Context are deleted.
 
 So, 
 - If my servlet had already send datas on the response outputstream, I have a 
 200 HTTP response with a truncated response,
 - If my servlet had not send datas before, I can have a 500 HTTP response 
 with NullPointerException, XML11Configuration not found, ...
 - If I try something like that :
 public void doGet(HttpServletRequest req, HttpServletResponse res) throws 
 ServletException, IOException {
   PrintWriter out = res.getWriter();
   try  {
 ...
   } catch (Exception e)
 {
   out.println( exception +e+ in this servlet, so bad result!!! );
 }
   }
 I have an Exception on the out.println line :-(
 
 
 So,
 - is there a configuration parameter, in Tomcat, that let the running threads 
 of a Context to finish before stopping them ?
 - if not, how to return a correctly response to the HTTP request client ?
 
 Thanks in advance for your ideas.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



stop context properly

2005-02-09 Thread Lionel Farbos
Hi all,

I work with Tomcat 4.1.31, with the Manager, and 
I search how to stop a context without interrupting its running threads ?

When I test a stop on my Context (/testServlet), 
I see a log like this :

2005-02-08 17:37:16 HTMLManager: stop: Stopping web application at 
'/testServlet'
2005-02-08 17:37:16 StandardHost[localhost]: standardHost.stop /testServlet
2005-02-08 17:37:16 StandardWrapper[/testServlet:Fille4Servlet]: Waiting for 1 
instance(s) to be deallocated
2005-02-08 17:37:17 Fille4Servlet: destroy deFille4Servlet==0

And all the servlets in my Context are deleted.

So, 
- If my servlet had already send datas on the response outputstream, I have a 
200 HTTP response with a truncated response,
- If my servlet had not send datas before, I can have a 500 HTTP response with 
NullPointerException, XML11Configuration not found, ...
- If I try something like that :
public void doGet(HttpServletRequest req, HttpServletResponse res) throws 
ServletException, IOException {
  PrintWriter out = res.getWriter();
  try  {
...
  } catch (Exception e)
{
  out.println( exception +e+ in this servlet, so bad result!!! );
}
  }
I have an Exception on the out.println line :-(


So,
- is there a configuration parameter, in Tomcat, that let the running threads 
of a Context to finish before stopping them ?
- if not, how to return a correctly response to the HTTP request client ?

Thanks in advance for your ideas.


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