How to release access to application from tomcat on ubuntu 12.04
===

When i am doing in windows when i stop the tomcat, application will release the hold on database, since application will stop with tomcat..But in ubuntu even if i stop the tomcat application is not releasing the access to database

i tried with sudo /etc/init.d/tomcat6 stop
             sudo service tomcat6 stop

i can't use pkill since if i kill the process, even connection to database server got released..i needed to start it manually..i only want to release access to database from application..How can i do it?

Any where tomcat is holding the application? or any other process there which is on hold?


Please show me a solution, what makes difference in windows and ubuntu?


Thanks in Advance,
              
varghese