jodd.db.pool
Class ContextConnectionPool

java.lang.Object
  extended byjodd.db.pool.ContextConnectionPool
All Implemented Interfaces:
ConnectionPool

public class ContextConnectionPool
extends java.lang.Object
implements ConnectionPool

Tomcat4 alike connection pools that uses Context for initilization.


Constructor Summary
ContextConnectionPool()
           
 
Method Summary
 void close()
          Close pool when it is not needed anymore.
 void freeConnection(java.sql.Connection conn)
          Return connection to connection pool
 java.sql.Connection getConnection()
          Get one free connection from the connection pool.
 void init()
          Initialize pool with current object state.
 void setDataSourceName(java.lang.String s)
           
 void setEnvContextName(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextConnectionPool

public ContextConnectionPool()
Method Detail

setEnvContextName

public void setEnvContextName(java.lang.String s)

setDataSourceName

public void setDataSourceName(java.lang.String s)

init

public void init()
          throws java.sql.SQLException
Description copied from interface: ConnectionPool
Initialize pool with current object state.

Specified by:
init in interface ConnectionPool
Throws:
java.sql.SQLException

close

public void close()
Description copied from interface: ConnectionPool
Close pool when it is not needed anymore.

Specified by:
close in interface ConnectionPool

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Description copied from interface: ConnectionPool
Get one free connection from the connection pool.

Specified by:
getConnection in interface ConnectionPool
Returns:
Connection object representing free database connection
Throws:
java.sql.SQLException

freeConnection

public void freeConnection(java.sql.Connection conn)
Return connection to connection pool

Specified by:
freeConnection in interface ConnectionPool
Parameters:
conn - database connection


Jodd v0.24.5 Javadoc