net.spy.db
Class ObjectPoolConnectionSource

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.db.ObjectPoolConnectionSource
All Implemented Interfaces:
ConnectionSource

public class ObjectPoolConnectionSource
extends SpyObject
implements ConnectionSource

Connection source to retrieve connections from an ObjectPool. The configuration passed into getConnection() requires the following parameters:

The following parameters are optional:


Constructor Summary
ObjectPoolConnectionSource()
          Get an instance of SpyPoolConnectionSource.
 
Method Summary
 java.sql.Connection getConnection(SpyConfig conf)
          Get a new connection.
 void returnConnection(java.sql.Connection conn)
          Return a connection.
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectPoolConnectionSource

public ObjectPoolConnectionSource()
Get an instance of SpyPoolConnectionSource.

Method Detail

getConnection

public java.sql.Connection getConnection(SpyConfig conf)
                                  throws java.sql.SQLException
Description copied from interface: ConnectionSource
Get a new connection.

Specified by:
getConnection in interface ConnectionSource
Parameters:
conf - a SpyConfig describing the connection that needs to be fetched.
Throws:
java.sql.SQLException - if a connection could not be obtained
See Also:
ConnectionSource

returnConnection

public void returnConnection(java.sql.Connection conn)
Description copied from interface: ConnectionSource
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.

Specified by:
returnConnection in interface ConnectionSource
See Also:
ConnectionSource


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