connection timeout limit?



Hi All,
What is the best method the close the dead database connection(oracle)
while connection time is too long.?
I have a database connection pool and having some probleam (hang)
while closing expired database connection in my web site(using
tomcat5).
Is there anyway to set connection timeout period for the connection
that will automatically close the connection in my souce code?

void expire( Connection connection )
{
try
{
logger.info( "closing JDBC connection...");
connection.close(); // *** hanging here
logger.info( "JDBC connection closed successfully!");
}
catch( SQLException e )
{
e.printStackTrace();
}
}

Thanks in advance.
-Dish

.



Relevant Pages

  • Re: Making a database connection global
    ... connection would be opened the same amount of time (which no-one yas yet ... Anyway, if he don't want to listen, a different angle will probably not ... to reference the database connection once. ... I created a class with a static database connection and the class opens ...
    (microsoft.public.dotnet.framework.aspnet)
  • Database Connection Question
    ... we were using an asp include file with database functions ... and would open and close the database connection multiple times in 1 script. ... I don't know, the persistent connection seems much better to me, easier to ...
    (microsoft.public.inetserver.asp.db)
  • Re: garbage collection
    ... it will get a reader back.. ... you can not reuse the connection on which it opened. ... > garbage collection issue, its a logical error. ... > on database connection is, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Database Connection question
    ... the other is a standalone app and is using ... >java.sql.DriverManager for Connection. ... Every time after obtaining a ... >My task is to write generic code for database connection to be used in both ...
    (comp.lang.java.programmer)
  • RE: Activated Event Vs. other Events
    ... your function to check the database connection ... > The form has to render itself completely first, then attempt a connection, ... > I placed all related code in the Load event, just to realize this code gets ...
    (microsoft.public.dotnet.framework.windowsforms)