org.jboss.soa.esb.connection
Interface ConnectionPool

All Known Implementing Classes:
DefaultConnectionPoolImpl

public interface ConnectionPool

Interface that needs to be implemented to provide pool of connections.

Author:
MohitK Date: Jul 18, 2006
See Also:
Default implementation of Connection Pool

Method Summary
 void closeConnection(java.sql.Connection connectionToClose)
          This method closes an open connection and returns the connection to the pool.
 void createPool(ConnectionProperties prop)
          This method is used to create the connection pool and keep it ready
 java.sql.Connection getConnection()
          This method is called whenever a connection is needed from the pool.
 void releasePool()
          This method is called when the pool needs to be destroyed effectively closing all open connections
 

Method Detail

createPool

void createPool(ConnectionProperties prop)
                throws ConnectionException
This method is used to create the connection pool and keep it ready

Parameters:
prop - Properties for the connection pool including connection properties
Throws:
ConnectionException

getConnection

java.sql.Connection getConnection()
                                  throws java.sql.SQLException
This method is called whenever a connection is needed from the pool.

Returns:
Connection to be used
Throws:
java.sql.SQLException

closeConnection

void closeConnection(java.sql.Connection connectionToClose)
                     throws java.sql.SQLException
This method closes an open connection and returns the connection to the pool.

Parameters:
connectionToClose - The connection to be returned to the pool.
Throws:
java.sql.SQLException

releasePool

void releasePool()
                 throws java.sql.SQLException
This method is called when the pool needs to be destroyed effectively closing all open connections

Throws:
java.sql.SQLException