org.jminor.common.db
Interface PoolableConnectionProvider


public interface PoolableConnectionProvider

Defines an interface responsible for creating PoolableConnection instances.


Method Summary
 PoolableConnection createConnection(User user)
          Creates a new PoolableConnection instance based on the given user.
 void destroyConnection(PoolableConnection connection)
          Disconnects the given connection and disposes of any resources it holds.
 

Method Detail

createConnection

PoolableConnection createConnection(User user)
                                    throws ClassNotFoundException,
                                           SQLException
Creates a new PoolableConnection instance based on the given user.

Parameters:
user - the user
Returns:
a new PoolableConnection instance
Throws:
ClassNotFoundException - in case the JDBC driver class was not found
SQLException - in case of a database exception

destroyConnection

void destroyConnection(PoolableConnection connection)
Disconnects the given connection and disposes of any resources it holds.

Parameters:
connection - the connection to destroy