net.spy.db
Interface ConnectionSource

All Known Implementing Classes:
JDBCConnectionSource, JNDIConnectionSource, ObjectPoolConnectionSource

public interface ConnectionSource

Interface for classes that will create database connections.


Method Summary
 Connection getConnection(SpyConfig conf)
          Get a new connection.
 void returnConnection(Connection conn)
          Return a connection.
 

Method Detail

getConnection

Connection getConnection(SpyConfig conf)
                         throws SQLException
Get a new connection.

Parameters:
conf - a SpyConfig describing the connection that needs to be fetched.
Throws:
SQLException - if a connection could not be obtained

returnConnection

void returnConnection(Connection conn)
Return a connection. This method is used to inform whatever pooling mechanism is in use that the connection is no longer wanted, or needed, or even cared about here.



Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.