org.apache.commons.dbcp
Class AbandonedConfig

java.lang.Object
  |
  +--org.apache.commons.dbcp.AbandonedConfig

public class AbandonedConfig
extends java.lang.Object

Configuration settings for handling abandoned db connections.

Version:
$Revision: 1.1 $ $Date: 2002/05/16 21:25:37 $
Author:
Glenn L. Nielsen

Constructor Summary
AbandonedConfig()
           
 
Method Summary
 boolean getLogAbandoned()
          Flag to log stack traces for application code which abandoned a Statement or Connection.
 boolean getRemoveAbandoned()
          Flag to remove abandoned connections if they exceed the removeAbandonedTimeout.
 int getRemoveAbandonedTimeout()
          Timeout in seconds before an abandoned connection can be removed.
 void setLogAbandoned(boolean logAbandoned)
          Flag to log stack traces for application code which abandoned a Statement or Connection.
 void setRemoveAbandoned(boolean removeAbandoned)
          Flag to remove abandoned connections if they exceed the removeAbandonedTimeout.
 void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
          Timeout in seconds before an abandoned connection can be removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbandonedConfig

public AbandonedConfig()
Method Detail

getLogAbandoned

public boolean getLogAbandoned()
Flag to log stack traces for application code which abandoned a Statement or Connection. Defaults to false. Logging of abandoned Statements and Connections adds overhead for every Connection open or new Statement because a stack trace has to be generated.

Returns:
boolean

getRemoveAbandoned

public boolean getRemoveAbandoned()
Flag to remove abandoned connections if they exceed the removeAbandonedTimeout. Set to true or false, default false. If set to true a connection is considered abandoned and eligible for removal if it has been idle longer than the removeAbandonedTimeout. Setting this to true can recover db connections from poorly written applications which fail to close a connection.

Returns:
boolean

getRemoveAbandonedTimeout

public int getRemoveAbandonedTimeout()
Timeout in seconds before an abandoned connection can be removed. Defaults to 300 seconds.

Returns:
int remove abandoned timeout in seconds

setLogAbandoned

public void setLogAbandoned(boolean logAbandoned)
Flag to log stack traces for application code which abandoned a Statement or Connection. Defaults to false. Logging of abandoned Statements and Connections adds overhead for every Connection open or new Statement because a stack trace has to be generated.


setRemoveAbandoned

public void setRemoveAbandoned(boolean removeAbandoned)
Flag to remove abandoned connections if they exceed the removeAbandonedTimeout. Set to true or false, default false. If set to true a connection is considered abandoned and eligible for removal if it has been idle longer than the removeAbandonedTimeout. Setting this to true can recover db connections from poorly written applications which fail to close a connection.


setRemoveAbandonedTimeout

public void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
Timeout in seconds before an abandoned connection can be removed. Defaults to 300 seconds.



Copyright © 2001 Apache Software Foundation. Documenation generated August 12 2002.