OJB ConnectionFactory implemenation to bridge into the Avalon DataSource
connection pooling component defined in the Cocoon configuration.
This class has two faces to it:
Avalon Component
Instance of the class created and managed by Avalon container.
When instance is initialized, it looks up datasource components
service selector.
OJB Managed Class
Instances of the class are created and managed by OJB, as defined
in the OJB repository.xml file. Each OJB managed instance
of the class will have access to the datasource components service
selector initialized by Avalon managed instance of the class.
It is important that Avalon component is initialized before any access
to OJB API is made.
public ConnectionlookupConnection()
throws org.apache.ojb.broker.accesslayer.LookupException
Throws:
org.apache.ojb.broker.accesslayer.LookupException
releaseConnection
public void releaseConnection(Connection connection)
getActiveConnections
public int getActiveConnections()
getIdleConnections
public int getIdleConnections()
lookupConnection
public ConnectionlookupConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor conDesc)
throws org.apache.ojb.broker.accesslayer.LookupException
Specified by:
lookupConnection in interface org.apache.ojb.broker.accesslayer.ConnectionFactory
Throws:
org.apache.ojb.broker.accesslayer.LookupException
releaseConnection
public void releaseConnection(org.apache.ojb.broker.metadata.JdbcConnectionDescriptor conDesc,
Connection connection)
Specified by:
releaseConnection in interface org.apache.ojb.broker.accesslayer.ConnectionFactory
releaseAllResources
public void releaseAllResources()
Specified by:
releaseAllResources in interface org.apache.ojb.broker.accesslayer.ConnectionFactory