This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Tomcat and Database Sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Tomcat and Database Sessions" Watch "Tomcat and Database Sessions" New topic

Tomcat and Database Sessions

Midhun Agnihotram

Joined: Feb 20, 2010
Posts: 11
Hi All,

Our application set up is as follows : Tomcat 5.5 + Java 1.5 + Spring 2 + Hibernate 3.3 + Atomikos + Oracle 10G. Our application session timeout is set to 30 minutes in web.xml. With some heavy processing, we find that there are a lot of INACTIVE sessions in the Database. These might be due to the user closing the window or the web session timing out, etc - it is not clear.

How do I set to close my database sessions when the web sessions close ? Is there a way to clear the database sessions if the web sessions are active ?

Thiago Alves de Moraes

Joined: Dec 09, 2010
Posts: 8
Are you using Session replication with a shared database ?

take a look at this link
tomcat clustering - how to

I think you cannot do what you want.

thiago moraes
I agree. Here's the link:
subject: Tomcat and Database Sessions
It's not a secret anymore!