org.apache.commons.dbcp
Class AbandonedConfig
public
class
AbandonedConfig
extends Object
Deprecated: This will be removed in a future version of DBCP.
Configuration settings for handling abandoned db connections.
Version: $Revision: 482015 $ $Date: 2006-12-03 19:22:09 -0700 (Sun, 03 Dec 2006) $
Author: Glenn L. Nielsen
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.
|
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 true if stack trace logging is turned on for abandoned
Statements or Connections
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: true if abandoned connections are to be removed
public int getRemoveAbandonedTimeout()
Timeout in seconds before an abandoned connection can be removed.
Defaults to 300 seconds.
Returns: abandoned timeout in seconds
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.
Parameters: logAbandoned true turns on abandoned stack trace logging
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.
Parameters: removeAbandoned true means abandoned connections will be
removed
public void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
Timeout in seconds before an abandoned connection can be removed.
Defaults to 300 seconds.
Parameters: removeAbandonedTimeout abandoned timeout in seconds
Copyright © 2001-2004 Apache Software Foundation. Documenation generated December 10 2007.