com.atlassian.jira.ofbiz
Class InstrumentedSQLInterceptor

java.lang.Object
  extended by com.atlassian.jira.ofbiz.InstrumentedSQLInterceptor
All Implemented Interfaces:
org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor, org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

public class InstrumentedSQLInterceptor
extends Object
implements org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor

A SQL interceptor that stores all SQL call invocations as well as timing information in a thread local cache.

Since:
v4.4

Constructor Summary
InstrumentedSQLInterceptor()
           
 
Method Summary
 void afterSuccessfulExecution(String sql, List<String> params, Statement statement, ResultSet resultSet, int i)
           
 void beforeExecution(String sql, List<String> params, 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 sql, List<String> params, Statement statement, SQLException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstrumentedSQLInterceptor

public InstrumentedSQLInterceptor()
Method Detail

onConnectionTaken

public void onConnectionTaken(Connection connection,
                              org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
Specified by:
onConnectionTaken in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor

onConnectionReplaced

public void onConnectionReplaced(Connection connection,
                                 org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
Specified by:
onConnectionReplaced in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor

beforeExecution

public void beforeExecution(String sql,
                            List<String> params,
                            Statement statement)
Specified by:
beforeExecution in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

afterSuccessfulExecution

public void afterSuccessfulExecution(String sql,
                                     List<String> params,
                                     Statement statement,
                                     ResultSet resultSet,
                                     int i)
Specified by:
afterSuccessfulExecution in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

onException

public void onException(String sql,
                        List<String> params,
                        Statement statement,
                        SQLException e)
Specified by:
onException in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor


Copyright © 2002-2014 Atlassian. All Rights Reserved.