org.apache.ojb.broker.accesslayer
Class ConnectionFactoryDBCPImpl
java.lang.Object
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl
org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
- All Implemented Interfaces:
- ConnectionFactory
- public class ConnectionFactoryDBCPImpl
- extends ConnectionFactoryAbstractImpl
ConnectionFactory implementation using Jakarta DBCP and Commons Pool
to pool driver based connections.
Based on a proposal of Dirk Verbeek - Thanks.
- Version:
- $Id: ConnectionFactoryDBCPImpl.java,v 1.10.2.1 2005/03/16 17:51:18 mkalen Exp $
- Author:
- Armin Waibel
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionFactoryDBCPImpl
public ConnectionFactoryDBCPImpl()
getConnectionFromPool
public java.sql.Connection getConnectionFromPool(JdbcConnectionDescriptor jcd)
throws LookupException
- Description copied from class:
ConnectionFactoryAbstractImpl
- Implement this method. This method was called to obtain
a jdbc-connection from the pool.
Note: This method was
not called, if jdbc-connection-descriptor use datasources - OJB
only pool connections from DriverManager.
- Specified by:
getConnectionFromPool
in class ConnectionFactoryAbstractImpl
- Throws:
LookupException
returnConnectionToPool
public void returnConnectionToPool(JdbcConnectionDescriptor jcd,
java.sql.Connection con)
throws LookupException
- Description copied from class:
ConnectionFactoryAbstractImpl
- Implement this method. Was called to return a
connection to pool.
Note: This method was
not called, if the jdbc-connection-descriptor uses datasources - OJB
only pool connections from DriverManager.
- Specified by:
returnConnectionToPool
in class ConnectionFactoryAbstractImpl
- Throws:
LookupException
releaseAllResources
public void releaseAllResources()
- Closes all managed pools.
- Specified by:
releaseAllResources
in interface ConnectionFactory
- Overrides:
releaseAllResources
in class ConnectionFactoryAbstractImpl
(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