aspose file tools
The moose likes JDBC and the fly likes The duration of a database session Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "The duration of a database session" Watch "The duration of a database session" New topic
Author

The duration of a database session

Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

Hi all,

I am wondering is it normal to know the duration of a connected database session, from the time a database connection was established to the time the connection was terminated. Considering the fact of using the database pool.

I thought this is a common user case, but after googling a while, I am surprised to find that most database products does not have this information.

I am not interested in the Timeout option due to the fact it is a different user case.


Thanks.


SCJP, SCJD, SCWCD, SCBCD, SCEA
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1098

I guess as nobody has commented in 5 days the answer is no, nobody else cares

Jiafan Zhou
Ranch Hand

Joined: Sep 28, 2005
Posts: 192

Wendy Gibbons wrote:I guess as nobody has commented in 5 days the answer is no, nobody else cares



Yep, then how about the duration of database transaction?
Martin Vajsar
Bartender

Joined: Aug 22, 2010
Posts: 2319
    
    2

I'd say most databases have tools to query active transactions and their age. But if you're speaking about past transactions, then I'm not sure. In any case, it would be heavily database dependent.

Does your database provide some sort of performance reports? If it does (which is probable), my advice would be to read the documentation about these reports to see whether something like this is included in them. If it isn't, my guess is that the database doesn't track it. One of measurements usually tracked by databases is number of transactions per seconds (TPS), but this is completely unrelated to their duration.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: The duration of a database session
 
Similar Threads
Creating JavaMail session pool
how to call a javascript alert box from jsp page
Question on connection pool size.
Tradeoff between backend and front end
Connection pool size