|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jdbc.ConnectionPool
public class ConnectionPool
A connection pooling implementation. This class is NOT meant to be used by the application directly. Rather, a DataSource object should wrap this class.
Constructor Summary | |
---|---|
ConnectionPool(int size,
ConnectionFactory connSource,
int connectionTimeout,
String testQuery,
boolean testOnBorrow)
Deprecated. Constructor. |
Method Summary | |
---|---|
void |
cleanup()
Deprecated. To be called when the pool of connections is no longer needed. |
void |
finalize()
Deprecated. |
int |
getLoginTimeout()
Deprecated. |
PrintWriter |
getLogWriter()
Deprecated. |
protected Enumeration |
getOldConnections()
Deprecated. |
PooledConnection |
getPooledConnection()
Deprecated. Get a PooledConnection instance from the pool. |
int |
getSize()
Deprecated. Get the current size of the available pool. |
void |
putBack(XPooledConnection conn)
Deprecated. Puts back a connection after usage. |
protected void |
putInPool(PooledConnection pc)
Deprecated. |
void |
run()
Deprecated. |
void |
setLoginTimeout(int secs)
Deprecated. |
void |
setLogWriter(PrintWriter pw)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionPool(int size, ConnectionFactory connSource, int connectionTimeout, String testQuery, boolean testOnBorrow) throws SQLException
size
- The size of the pool.connSource
- The ConnectionFactory to use.seconds
- The timeout for old connections in the pool.testQuery
- A test query to validate connection liveness.testOnBorrow
- Should connections be tested when borrowed or not?
If true then connections will be tested when gotten:SQLException
Method Detail |
---|
public int getSize()
public PooledConnection getPooledConnection() throws SQLException
SQLException
- On error.protected void putInPool(PooledConnection pc)
public void putBack(XPooledConnection conn)
conn
- The connection. If the connection has been invalidated, or if
the pool is large enough, then this method will actually close
the connection.protected Enumeration getOldConnections()
public void run()
run
in interface Runnable
public void cleanup()
public void finalize() throws Throwable
finalize
in class Object
Throwable
public PrintWriter getLogWriter() throws SQLException
SQLException
public void setLogWriter(PrintWriter pw) throws SQLException
SQLException
public void setLoginTimeout(int secs) throws SQLException
SQLException
public int getLoginTimeout() throws SQLException
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |