Class PoolableManagedConnectionFactory

    • Constructor Detail

      • PoolableManagedConnectionFactory

        public PoolableManagedConnectionFactory​(XAConnectionFactory connFactory,
                                                javax.management.ObjectName dataSourceJmxName)
        Creates a PoolableManagedConnectionFactory and attach it to a connection pool.
        Parameters:
        connFactory - XAConnectionFactory
        dataSourceJmxName - The data source name.
    • Method Detail

      • makeObject

        public org.apache.commons.pool2.PooledObject<PoolableConnectionmakeObject()
                                                                             throws java.sql.SQLException
        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:
        java.sql.SQLException