Example usage for org.apache.commons.dbcp2 DelegatingConnection getDelegate

List of usage examples for org.apache.commons.dbcp2 DelegatingConnection getDelegate

Introduction

In this page you can find the example usage for org.apache.commons.dbcp2 DelegatingConnection getDelegate.

Prototype

public C getDelegate() 

Source Link

Document

Returns my underlying Connection .

Usage

From source file:com.eclecticlogic.pedal.connection.CommonsDBCPConnectionAccessor.java

/**
 * @see com.eclecticlogic.pedal.connection.ConnectionAccessor#getRawConnection(java.sql.Connection)
 */// w w  w .j av a 2s. c  o  m
@SuppressWarnings("unchecked")
@Override
public Connection getRawConnection(Connection providerConnection) {
    DelegatingConnection<PoolableConnection> conn = (DelegatingConnection<PoolableConnection>) providerConnection;
    PoolableConnection c = conn.getDelegate();
    return c.getDelegate();
}