net.ontopia.persistence.proxy
Class DBCPConnectionFactory

java.lang.Object
  extended by net.ontopia.persistence.proxy.AbstractConnectionFactory
      extended by net.ontopia.persistence.proxy.DBCPConnectionFactory
All Implemented Interfaces:
ConnectionFactoryIF

public class DBCPConnectionFactory
extends AbstractConnectionFactory

INTERNAL: Apache Commons DBCP connection factory implementation.


Field Summary
protected  javax.sql.DataSource datasource
           
protected  boolean defaultReadOnly
           
protected  int defaultTransactionIsolation
           
static java.lang.String EXHAUSED_BLOCK
           
static java.lang.String EXHAUSED_FAIL
           
static java.lang.String EXHAUSED_GROW
           
protected  net.ontopia.persistence.proxy.DBCPConnectionFactory.TraceablePoolableConnectionFactory pcfactory
           
protected  org.apache.commons.pool.impl.GenericObjectPool pool
           
 
Fields inherited from class net.ontopia.persistence.proxy.AbstractConnectionFactory
connstring, driver, password, properties, username
 
Constructor Summary
DBCPConnectionFactory(java.util.Map properties, boolean defaultReadOnly)
           
 
Method Summary
 void close()
          INTERNAL: Closes the connection factory.
protected  void initPool()
           
 java.sql.Connection requestConnection()
          INTERNAL: Requests a new connection object.
 void writeReport(java.io.Writer out)
           
 
Methods inherited from class net.ontopia.persistence.proxy.AbstractConnectionFactory
getConnectionString, getDriver, getPassword, getUserName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXHAUSED_BLOCK

public static final java.lang.String EXHAUSED_BLOCK
See Also:
Constant Field Values

EXHAUSED_GROW

public static final java.lang.String EXHAUSED_GROW
See Also:
Constant Field Values

EXHAUSED_FAIL

public static final java.lang.String EXHAUSED_FAIL
See Also:
Constant Field Values

pool

protected org.apache.commons.pool.impl.GenericObjectPool pool

datasource

protected javax.sql.DataSource datasource

pcfactory

protected net.ontopia.persistence.proxy.DBCPConnectionFactory.TraceablePoolableConnectionFactory pcfactory

defaultReadOnly

protected boolean defaultReadOnly

defaultTransactionIsolation

protected int defaultTransactionIsolation
Constructor Detail

DBCPConnectionFactory

public DBCPConnectionFactory(java.util.Map properties,
                             boolean defaultReadOnly)
Method Detail

initPool

protected void initPool()

requestConnection

public java.sql.Connection requestConnection()
                                      throws java.sql.SQLException
Description copied from interface: ConnectionFactoryIF
INTERNAL: Requests a new connection object.

Specified by:
requestConnection in interface ConnectionFactoryIF
Specified by:
requestConnection in class AbstractConnectionFactory
Throws:
java.sql.SQLException

close

public void close()
Description copied from interface: ConnectionFactoryIF
INTERNAL: Closes the connection factory.

Specified by:
close in interface ConnectionFactoryIF
Overrides:
close in class AbstractConnectionFactory

writeReport

public void writeReport(java.io.Writer out)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2000-2012 Ontopia.