org.apache.ojb.broker.accesslayer
Interface ConnectionFactory

All Known Implementing Classes:
ConnectionFactoryAbstractImpl

public interface ConnectionFactory

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

See Also:
ConnectionFactoryPooledImpl, ConnectionFactoryNotPooledImpl, ConnectionFactoryDBCPImpl, ConnectionFactoryManagedImpl

Method Summary
 java.sql.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, java.sql.Connection con)
          Release connection - CAUTION: Release every connection after use to avoid abandoned connections.
 

Method Detail

lookupConnection

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

Throws:
LookupException

releaseConnection

public void releaseConnection(JdbcConnectionDescriptor jcd,
                              java.sql.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

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



(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.3, 2005-04-2