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
 java.sql.Connection getConnection(SpyConfig conf)
          Get a new connection.
 void returnConnection(java.sql.Connection conn)
          Return a connection.
 

Method Detail

getConnection

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

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

returnConnection

void returnConnection(java.sql.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-2006 SPY Internetworking. All Rights Reserved.