org.apache.ojb.broker.accesslayer
Interface ConnectionFactory

All Known Implementing Classes:
ConnectionFactoryAbstractImpl, ConnectionFactoryDBCPImpl, ConnectionFactoryManagedImpl, ConnectionFactoryNotPooledImpl, ConnectionFactoryPooledImpl

public interface ConnectionFactory

ConnectionFactory is responsible to lookup and release the connections used by the ConnectionManagerIF implementation.

Version:
$Id: ConnectionFactory.java,v 1.1 2007-08-24 22:17:30 ewestfal Exp $
See Also:
ConnectionFactoryPooledImpl, ConnectionFactoryNotPooledImpl, ConnectionFactoryDBCPImpl, ConnectionFactoryManagedImpl

Method Summary
 Connection lookupConnection(JdbcConnectionDescriptor jcd)
          Lookup a connection from the connection factory implementation.
 void releaseAllResources()
          Release all resources used by the implementing class (e.g.
 void releaseConnection(JdbcConnectionDescriptor jcd, Connection con)
          Release connection - CAUTION: Release every connection after use to avoid abandoned connections.
 

Method Detail

lookupConnection

Connection lookupConnection(JdbcConnectionDescriptor jcd)
                            throws LookupException
Lookup a connection from the connection factory implementation.

Throws:
LookupException

releaseConnection

void releaseConnection(JdbcConnectionDescriptor jcd,
                       Connection con)
Release connection - CAUTION: Release every connection after use to avoid abandoned connections. Depending on the used implementation connection will be closed, returned to pool, ...


releaseAllResources

void releaseAllResources()
Release all resources used by the implementing class (e.g. connection pool, ...) for the given connection descriptor.



Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.