Class PoolableManagedConnectionFactory

java.lang.Object
org.apache.commons.dbcp2.PoolableConnectionFactory
org.apache.commons.dbcp2.managed.PoolableManagedConnectionFactory
All Implemented Interfaces:
org.apache.commons.pool2.PooledObjectFactory<PoolableConnection>

public class PoolableManagedConnectionFactory extends PoolableConnectionFactory
Since:
2.0
Version:
$Id: PoolableManagedConnectionFactory.java 1659452 2015-02-13 04:00:39Z psteitz $
  • Constructor Details

    • PoolableManagedConnectionFactory

      public PoolableManagedConnectionFactory(XAConnectionFactory connFactory, ObjectName dataSourceJmxName)
      Create a PoolableManagedConnectionFactory and attach it to a connection pool.
      Parameters:
      connFactory - XAConnectionFactory
  • Method Details

    • makeObject

      public org.apache.commons.pool2.PooledObject<PoolableConnection> makeObject() throws Exception
      Uses the configured XAConnectionFactory to create a PoolableManagedConnection. Throws IllegalStateException if the connection factory returns null. Also initializes the connection using configured initialization sql (if provided) and sets up a prepared statement pool associated with the PoolableManagedConnection if statement pooling is enabled.
      Specified by:
      makeObject in interface org.apache.commons.pool2.PooledObjectFactory<PoolableConnection>
      Overrides:
      makeObject in class PoolableConnectionFactory
      Throws:
      Exception