org.apache.commons.dbcp
Class AbandonedConfig

java.lang.Object
  extended byorg.apache.commons.dbcp.AbandonedConfig

Deprecated. This will be removed in a future version of DBCP.

public class AbandonedConfig
extends Object

Configuration settings for handling abandoned db connections.

Version:
$Revision: 892307 $ $Date: 2013-12-31 23:27:28 +0000 (Tue, 31 Dec 2013) $
Author:
Glenn L. Nielsen

Constructor Summary
AbandonedConfig()
          Deprecated.  
 
Method Summary
 boolean getLogAbandoned()
          Deprecated. Flag to log stack traces for application code which abandoned a Statement or Connection.
 boolean getRemoveAbandoned()
          Deprecated. Flag to remove abandoned connections if they exceed the removeAbandonedTimeout.
 int getRemoveAbandonedTimeout()
          Deprecated. Timeout in seconds before an abandoned connection can be removed.
 void setLogAbandoned(boolean logAbandoned)
          Deprecated. Flag to log stack traces for application code which abandoned a Statement or Connection.
 void setRemoveAbandoned(boolean removeAbandoned)
          Deprecated. Flag to remove abandoned connections if they exceed the removeAbandonedTimeout.
 void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
          Deprecated. 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()
Deprecated. 
Method Detail

getRemoveAbandoned

public boolean getRemoveAbandoned()
Deprecated. 
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:
true if abandoned connections are to be removed

setRemoveAbandoned

public void setRemoveAbandoned(boolean removeAbandoned)
Deprecated. 
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.

Parameters:
removeAbandoned - true means abandoned connections will be removed

getRemoveAbandonedTimeout

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

Returns:
abandoned timeout in seconds

setRemoveAbandonedTimeout

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

Parameters:
removeAbandonedTimeout - abandoned timeout in seconds

getLogAbandoned

public boolean getLogAbandoned()
Deprecated. 
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 true if stack trace logging is turned on for abandoned Statements or Connections

setLogAbandoned

public void setLogAbandoned(boolean logAbandoned)
Deprecated. 
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.

Parameters:
logAbandoned - true turns on abandoned stack trace logging


Copyright © The Apache Software Foundation. All Rights Reserved.