public class ChainedSQLInterceptor extends Object implements org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
SQLInterceptor
that can chain together multiple
SQLInterceptors.
It will call them in an enveloping order, and any runtime exceptions thrown by one of the chained interceptors will be caught and logged but otherwise ignored.
For example, if we add 'one' and 'two', then it will call:
one.beforeExecution(...) two.beforeExecution(...) two.afterSuccessfulExecution(...) one.afterSuccessfulExecution(...)
Modifier and Type | Class and Description |
---|---|
static class |
ChainedSQLInterceptor.Builder |
Modifier and Type | Method and Description |
---|---|
void |
afterSuccessfulExecution(String sqlString,
List<String> parameterValues,
Statement statement,
ResultSet resultSet,
int rowsUpdated) |
void |
beforeExecution(String sqlString,
List<String> parameterValues,
Statement statement) |
void |
onConnectionReplaced(Connection connection,
org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState) |
void |
onConnectionTaken(Connection connection,
org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState) |
void |
onException(String sqlString,
List<String> parameterValues,
Statement statement,
SQLException sqlException) |
public void onConnectionTaken(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
onConnectionTaken
in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
public void onConnectionReplaced(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
onConnectionReplaced
in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor
public void beforeExecution(String sqlString, List<String> parameterValues, Statement statement)
beforeExecution
in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
public void afterSuccessfulExecution(String sqlString, List<String> parameterValues, Statement statement, ResultSet resultSet, int rowsUpdated)
afterSuccessfulExecution
in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
public void onException(String sqlString, List<String> parameterValues, Statement statement, SQLException sqlException)
onException
in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor
Copyright © 2002-2019 Atlassian. All Rights Reserved.