jodd.db.connection
Interface ConnectionProvider

All Known Implementing Classes:
ConnectionPoolDataSourceConnectionProvider, CoreConnectionPool, DataSourceConnectionProvider, DriverManagerConnectionProvider, XADataSourceConnectionProvider

public interface ConnectionProvider

A generic strategy for obtaining JDBC connections.

Implementors might also implement connection pooling.

Implementations should provide a public default constructor.


Method Summary
 void close()
          Closes a provider and releases all its resources.
 void closeConnection(java.sql.Connection conn)
          Dispose of a used connection.
 java.sql.Connection getConnection()
          Get a connection.
 void init()
          Initialize the connection provider.
 

Method Detail

init

void init()
Initialize the connection provider. Properties are provided either with constructor either with bean setters.


getConnection

java.sql.Connection getConnection()
Get a connection.


closeConnection

void closeConnection(java.sql.Connection conn)
Dispose of a used connection.


close

void close()
Closes a provider and releases all its resources.



Copyright ©2008 Jodd Team