com.cafesoft.core.jdbc
Interface ConnectionProvider

All Known Implementing Classes:
StandardConnectionProvider

public interface ConnectionProvider

ConnectionProvider defines the interface for objects that provide access to JDBC Connections.

Since:
09/29/04
See Also:
Connection

Method Summary
 void close()
          Close the ConnectionProvider.
 void configure(Properties p)
          Configure the ConnectionProvider.
 void destroy()
          Destroy the ConnectionProvider.
 Connection getConnection()
          Get a Connection.
 void releaseConnection(Connection c)
          Release a Connection.
 

Method Detail

configure

public void configure(Properties p)
               throws ConfigurationException
Configure the ConnectionProvider.

Parameters:
p - configuration Properties.
Throws:
ConfigurationException - if required configuration properties are missing or invalid.

getConnection

public Connection getConnection()
                         throws SQLException
Get a Connection.

NOTE: Clients that get a Connection are required to release it when done.

Returns:
a Connection.
Throws:
SQLException - if unable to get a Connection.

releaseConnection

public void releaseConnection(Connection c)
Release a Connection.

Parameters:
c - the Connection to be released.

close

public void close()
Close the ConnectionProvider.

NOTE: this method must only be invoked by objects controlling access to the ConnectionProvider.


destroy

public void destroy()
Destroy the ConnectionProvider.



Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.