Tomcat problem

J

Jan Burse

Arne said:
daemon => run in background, you stop and start via the scripts
in init.d (or use one the GUI tools on top of that)

console app => run in xterm, you start by running sh file and
stop with CTRL/C

Arne

I guess CTRL/C will kill the tomcat app.

When running as console app, you can open a second xterm, and
run the stop sh file. This will inform the currently running
tomcat and initiate a proper shutdown sequence.

Instead of keeping the first xterm open, you can also executed
the start sh file instead of the run sh file. But keeping the
first xterm open is sometimes useful, since you can directly
observe in the console what tomcat is doing via what it writes
on stdout/stderr.

But stdout/stderr are also available as log files. So nothing
gets lost when you don't keep the first xterm open.

Web contexts might install some listeners, which will get
informed during shutdown of tomcat, and can do some additional
work during shutdown:

<web-app>
<!-- Usual stuff here -->
<listener>
<listener-class>com.mycompany.MyClass</listener-class>
</listener>
</web-app>

When using the Tomcat Monitor control on Windows, it will also
shutdown a tomcat app this way, and not simply kill it.

I am not sure whether some newer Tomcat version do also memory
leak detection during shut down, at least it seems to me that
this is done when contexts are reloaded.

Be
 
A

Arne Vajhøj

I guess CTRL/C will kill the tomcat app.

When running as console app, you can open a second xterm, and
run the stop sh file. This will inform the currently running
tomcat and initiate a proper shutdown sequence.
But stdout/stderr are also available as log files. So nothing
gets lost when you don't keep the first xterm open.

Web contexts might install some listeners, which will get
informed during shutdown of tomcat, and can do some additional
work during shutdown:

<web-app>
<!-- Usual stuff here -->
<listener>
<listener-class>com.mycompany.MyClass</listener-class>
</listener>
</web-app>

Good point.

CTRL/C is not the right way.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top