|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mf.kennewick.broker.ConnectionManager
For relational database broker layers, this class implements connection pooling and deals with establishing JDBC connections. A word on Kennewick connection pooling: The Kennewick framework does provide a simple form of connection pooling for applications that require it and have no other reliable form of connection pooling available. The connection pooling feature was created to work around instability in Oracle's pooling drivers. In situations where database or application server provided drivers can be counted on to pool connections without hanging or crashing, it is recommended that Kennewick connection pooling be turned off.
Constructor Summary | |
ConnectionManager(DatasourceConfiguration config)
Creates a new connection manager. |
Method Summary | |
void |
deprecateConnection(java.sql.Connection aConnection)
Flags a connection as being expired and no longer issuable by the getConnection() method
Once called, this connection will stay open until all statements and resultsets open
against it are closed, then it will be closed. |
java.sql.Connection |
getConnection(boolean forceNewConnection,
boolean lockConnection)
|
java.sql.Connection |
getConnection(boolean forceNewConnection,
boolean lockConnection,
int retryCount)
Returns a JDBC connection which may be created from scratch or selected from a pool depending on input parameters and system configuration. |
int |
getConnectionCount()
|
int |
getConnectionTimout()
|
java.lang.String |
getDatasourceId()
|
java.lang.String |
getJndiName()
|
int |
getPurgeInterval()
|
int |
getQueryLimit()
|
java.lang.String |
getTableQualifer()
|
boolean |
isPoolingEnabled()
|
static java.sql.ResultSet |
runSimpleQuery(java.lang.String sql)
Convenience method for running a database query when no protection of the resultset from closure is required. |
void |
unlockConnection(java.sql.Connection aConnection)
Restores a connection locked for exclusive use to the pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConnectionManager(DatasourceConfiguration config)
Method Detail |
public void unlockConnection(java.sql.Connection aConnection)
aConnection
- public static java.sql.ResultSet runSimpleQuery(java.lang.String sql) throws java.sql.SQLException
sql
-
java.sql.SQLException
public void deprecateConnection(java.sql.Connection aConnection)
getConnection()
method
Once called, this connection will stay open until all statements and resultsets open
against it are closed, then it will be closed.
aConnection
- public java.sql.Connection getConnection(boolean forceNewConnection, boolean lockConnection)
public java.sql.Connection getConnection(boolean forceNewConnection, boolean lockConnection, int retryCount)
forceNewConnection
- lockConnection
-
public int getConnectionCount()
public int getConnectionTimout()
public java.lang.String getDatasourceId()
public java.lang.String getJndiName()
public boolean isPoolingEnabled()
public int getPurgeInterval()
public int getQueryLimit()
public java.lang.String getTableQualifer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |