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 364787 2005-04-26 03:41:37Z mkalen $
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. connection pool, ...)
 void releaseConnection(JdbcConnectionDescriptor jcd, java.sql.Connection con)
          Release connection - CAUTION: Release every connection after use to avoid abandoned connections.
 

Method Detail

lookupConnection

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

Throws:
LookupException

releaseConnection

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

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



(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30