Class DelegateConnectionProvider
- java.lang.Object
-
- org.openbravo.erpCommon.ad_callouts.DelegateConnectionProvider
-
- All Implemented Interfaces:
ConnectionProvider
- Direct Known Subclasses:
SimpleCallout
public class DelegateConnectionProvider extends Object implements ConnectionProvider
A connection provider which is used on current SimpleCallout infrastructure (seeSimpleCallout
). This implementation is required to maintain backwards compatibility in SimpleCallouts implementations.- Author:
- inigo.sanchez
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
log4j
protected ConnectionProvider
myPool
-
Constructor Summary
Constructors Constructor Description DelegateConnectionProvider()
-
Method Summary
-
-
-
Field Detail
-
myPool
protected ConnectionProvider myPool
-
log4j
protected org.apache.logging.log4j.Logger log4j
-
-
Method Detail
-
init
public void init(CalloutServletConfig config)
-
getConnection
public Connection getConnection() throws NoConnectionAvailableException
- Specified by:
getConnection
in interfaceConnectionProvider
- Throws:
NoConnectionAvailableException
-
getRDBMS
public String getRDBMS()
- Specified by:
getRDBMS
in interfaceConnectionProvider
-
getTransactionConnection
public Connection getTransactionConnection() throws NoConnectionAvailableException, SQLException
- Specified by:
getTransactionConnection
in interfaceConnectionProvider
- Throws:
NoConnectionAvailableException
SQLException
-
releaseCommitConnection
public void releaseCommitConnection(Connection conn) throws SQLException
- Specified by:
releaseCommitConnection
in interfaceConnectionProvider
- Throws:
SQLException
-
releaseRollbackConnection
public void releaseRollbackConnection(Connection conn) throws SQLException
- Specified by:
releaseRollbackConnection
in interfaceConnectionProvider
- Throws:
SQLException
-
getPreparedStatement
public PreparedStatement getPreparedStatement(String poolName, String strSql) throws Exception
- Specified by:
getPreparedStatement
in interfaceConnectionProvider
- Throws:
Exception
-
getPreparedStatement
public PreparedStatement getPreparedStatement(String strSql) throws Exception
- Specified by:
getPreparedStatement
in interfaceConnectionProvider
- Throws:
Exception
-
getPreparedStatement
public PreparedStatement getPreparedStatement(Connection conn, String strSql) throws SQLException
- Specified by:
getPreparedStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
releasePreparedStatement
public void releasePreparedStatement(PreparedStatement preparedStatement) throws SQLException
- Specified by:
releasePreparedStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
getStatement
public Statement getStatement(String poolName) throws Exception
- Specified by:
getStatement
in interfaceConnectionProvider
- Throws:
Exception
-
getStatement
public Statement getStatement() throws Exception
- Specified by:
getStatement
in interfaceConnectionProvider
- Throws:
Exception
-
getStatement
public Statement getStatement(Connection conn) throws SQLException
- Specified by:
getStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
releaseStatement
public void releaseStatement(Statement statement) throws SQLException
- Specified by:
releaseStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
releaseTransactionalStatement
public void releaseTransactionalStatement(Statement statement) throws SQLException
- Specified by:
releaseTransactionalStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
releaseTransactionalPreparedStatement
public void releaseTransactionalPreparedStatement(PreparedStatement preparedStatement) throws SQLException
- Specified by:
releaseTransactionalPreparedStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
getCallableStatement
public CallableStatement getCallableStatement(String poolName, String strSql) throws Exception
- Specified by:
getCallableStatement
in interfaceConnectionProvider
- Throws:
Exception
-
getCallableStatement
public CallableStatement getCallableStatement(String strSql) throws Exception
- Specified by:
getCallableStatement
in interfaceConnectionProvider
- Throws:
Exception
-
getCallableStatement
public CallableStatement getCallableStatement(Connection conn, String strSql) throws SQLException
- Specified by:
getCallableStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
releaseCallableStatement
public void releaseCallableStatement(CallableStatement callableStatement) throws SQLException
- Specified by:
releaseCallableStatement
in interfaceConnectionProvider
- Throws:
SQLException
-
destroy
public void destroy() throws Exception
- Specified by:
destroy
in interfaceConnectionProvider
- Throws:
Exception
-
getStatus
public String getStatus()
- Specified by:
getStatus
in interfaceConnectionProvider
-
-