Hi,

>able to access MySQL databases from other servers with the servlets
that
>I've programmed.  However, after a time, it cannot seem to connect to
the

Are there any error messages?

>databases through servlets, yet when I run Java standalone equivalents
of
>the servlets, they connect to the databases just fine.  Also, when
these

It's very difficult to simulate a servlet environment outside a servlet
container.  There are always timing, threading, and other issues that
are subtle and easy to overlook.

Nonetheless, stand-alone tests are useful.  Just don't rely on them to
say with 100% certainty that the code is right.

>connection problems start, I tried to stop the Tomcat service then
restart
>it, but it cannot shut down.  I can't even "hard kill" it through Task

Tomcat will not shutdown if you (explicitly or through some 3rd party
software you're using in your webapp) have started non-daemon threads.
See the JavaDoc for the Thread class for an example.

If the above is happening, there are several possible workarounds.
Perhaps the simplest one is to write a ServletContextListener that calls
System.exit() at the end of its contextDestroyed() method.  Obviously,
you want to make sure yours is the only webapp on the tomcat instance if
you take this approach.

Additional configuration and logging details would help us help you ;)

Yoav Shapira
Millennium ChemInformatics

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:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to