Fantastic...

but i dont quite get it, here's the command from catalina.sh:

exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-4.0/catalina/src/share \
-Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
org.apache.catalina.startup.Bootstrap "$@" start


and here's the resulting process listed by `ps -efH | grep catalina`:

monster 9665 1 0 15:02 pts/2 00:00:08 /usr/local/j2sdk_nb/j2sdk1.4.2/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed -classpath /usr/local/j2sdk_nb/j2sdk1.4.2/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar -Djava.security.manager -Djava.security.policy==/usr/local/tomcat/conf/catalina.pol

so thought it's cut off, the process is exactly what catalina.sh started, so why doesnt catalina.sh stop it?

My second question as follows, what exactly do you mean by 'my application or 3rd party libraries it uses'? Are you saying that if I use some external jars in my web applications WEB-INF/lib/ directory, then I have to make sure their use is discontinued, seperately from catalina.sh??

Lastly, it seems as if making sure all threads are started as daemons is the best way to go but I dont know how to do that?

thanks
Sam Seaver


Shapira, Yoav wrote:


Howdy,



However, I have come to realise that on occaison, the 'stop' command
does not work, and when I restart, I thereafter create two copies of


the


original tomcat. this should not be possible because the first tomcat
should be using the same port, and thus blocking the restart, but
somehow, the restart does happen??

When I stop the second process, then tomcat officially stops working,
even though the original process is still runnning.

Has this happened to anyone else?



You likely have non-daemon threads that prevent the JVM from existing. Tomcat shuts its own threads down, including the listeners, so the ports are available for other processes, and you can start another tomcat. But the first JVM instance can't exit.

You are responsible for shutting down threads started by your
application or 3rd party libraries it uses.  Alternatively, make all
your threads daemons, or add shutdown code in a context listener or a
JVM shutdown hook.

Yoav Shapira




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



--------------------------------------------------------------------- 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]



Reply via email to