|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gnu.beanfactory.jdbc.BasicConnectionPool
Implementation of the ConnectionPool interface that does not implement pooling. This class is useful with batch processing where a pooling mechanism can cause problems. It is also useful in conjunction with the WebLogic connection pool, which exposes itself as a "normal" JDBC driver.
| Constructor Summary | |
BasicConnectionPool()
|
|
| Method Summary | |
boolean |
getAutoCommit()
|
boolean |
getCacheStatements()
Statement Cache |
int |
getCheckoutTimeout()
Max number of seconds a connection can be checked out from the pool. |
java.lang.String |
getDriver()
Underlying JDBC driver class name. |
int |
getIdleTimeout()
Max number of seconds a connection can sit unused before it is closed. |
int |
getMaxCheckout()
Max number of times a particular connection can be used before it is closed. |
int |
getMaxConnections()
Max allowable number of open connections. |
java.lang.String |
getPassword()
Password used to connect to the database. |
java.lang.String |
getPooledUrl()
If the connection pool exposes the connections through a "virtual" driver, this read-only property will provide the name. |
java.lang.String |
getPoolName()
Name of the pool. |
boolean |
getTracing()
|
java.lang.String |
getUrl()
JDBC URL to the database. |
java.lang.String |
getUser()
Username used to connect to the database. |
java.sql.Connection |
obtainConnection()
Obtains a connection from the pool. |
void |
postInit()
|
void |
releaseConnection(java.sql.Connection c)
Releases a connection. |
void |
setAutoCommit(boolean autoCommit)
|
void |
setCacheStatements(boolean cache)
Statement Cache |
void |
setCheckoutTimeout(int i)
Max number of seconds a connection can be checked out from the pool. |
void |
setDriver(java.lang.String driver)
Underlying JDBC driver class name. |
void |
setIdleTimeout(int i)
Max number of seconds a connection can sit unused before it is closed. |
void |
setMaxCheckout(int i)
Max number of times a particular connection can be used before it is closed. |
void |
setMaxConnections(int i)
Max allowable number of open connections. |
void |
setPassword(java.lang.String password)
Password used to connect to the database. |
void |
setPoolName(java.lang.String name)
Name of the pool. |
void |
setTracing(boolean flag)
|
void |
setUrl(java.lang.String url)
JDBC URL to the database. |
void |
setUser(java.lang.String user)
Username used to connect to the database. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public BasicConnectionPool()
| Method Detail |
public int getMaxConnections()
ConnectionPoolgetMaxConnections in interface ConnectionPoolpublic void setMaxConnections(int i)
ConnectionPoolsetMaxConnections in interface ConnectionPoolpublic void setIdleTimeout(int i)
ConnectionPoolsetIdleTimeout in interface ConnectionPoolpublic int getIdleTimeout()
ConnectionPoolgetIdleTimeout in interface ConnectionPoolpublic int getCheckoutTimeout()
ConnectionPoolgetCheckoutTimeout in interface ConnectionPoolpublic void setCheckoutTimeout(int i)
ConnectionPoolsetCheckoutTimeout in interface ConnectionPoolpublic int getMaxCheckout()
ConnectionPoolgetMaxCheckout in interface ConnectionPoolpublic void setMaxCheckout(int i)
ConnectionPoolsetMaxCheckout in interface ConnectionPoolpublic void setCacheStatements(boolean cache)
ConnectionPoolsetCacheStatements in interface ConnectionPoolpublic boolean getCacheStatements()
ConnectionPoolgetCacheStatements in interface ConnectionPoolpublic java.lang.String getPoolName()
ConnectionPoolgetPoolName in interface ConnectionPoolpublic boolean getAutoCommit()
getAutoCommit in interface ConnectionPoolpublic void setAutoCommit(boolean autoCommit)
setAutoCommit in interface ConnectionPoolpublic void setPoolName(java.lang.String name)
ConnectionPoolsetPoolName in interface ConnectionPoolpublic java.lang.String getUrl()
ConnectionPoolgetUrl in interface ConnectionPoolpublic void setUrl(java.lang.String url)
ConnectionPoolsetUrl in interface ConnectionPoolpublic void setDriver(java.lang.String driver)
ConnectionPoolsetDriver in interface ConnectionPoolpublic java.lang.String getDriver()
ConnectionPoolgetDriver in interface ConnectionPoolpublic void setUser(java.lang.String user)
ConnectionPoolsetUser in interface ConnectionPoolpublic java.lang.String getUser()
ConnectionPoolgetUser in interface ConnectionPoolpublic void setPassword(java.lang.String password)
ConnectionPoolsetPassword in interface ConnectionPoolpublic java.lang.String getPassword()
ConnectionPoolgetPassword in interface ConnectionPoolpublic java.lang.String getPooledUrl()
ConnectionPoolgetPooledUrl in interface ConnectionPool
public void postInit()
throws java.sql.SQLException,
EncapsulatedException
postInit in interface ConnectionPool
public java.sql.Connection obtainConnection()
throws java.sql.SQLException
ConnectionPoolobtainConnection in interface ConnectionPoolpublic void releaseConnection(java.sql.Connection c)
ConnectionPoolreleaseConnection in interface ConnectionPoolpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setTracing(boolean flag)
setTracing in interface ConnectionPoolpublic boolean getTracing()
getTracing in interface ConnectionPool
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||