@Override public Connection getConnection(BasicDataSource dataSource, String login, String password) throws SQLException { return buildConnectionProxy(new ProfilingConnectionHandler(dataSource.getConnection(login, password))); }
@Override public Object invoke(Object target, Method method, Object[] args) throws Throwable { Object result = InvocationUtils.invokeQuietly(connection, method, args); if ("prepareStatement".equals(method.getName())) { PreparedStatement statement = (PreparedStatement) result; String sql = (String) args[0]; return buildStatementProxy(PreparedStatement.class, new ProfilingPreparedStatementHandler(statement, sql)); } if ("createStatement".equals(method.getName())) { Statement statement = (Statement) result; return buildStatementProxy(Statement.class, new ProfilingStatementHandler(statement)); } return result; }
@Override public Connection getConnection(BasicDataSource dataSource) throws SQLException { return buildConnectionProxy(new ProfilingConnectionHandler(dataSource.getConnection())); }
@Override public Object invoke(Object target, Method method, Object[] args) throws Throwable { Object result = InvocationUtils.invokeQuietly(connection, method, args); if ("prepareStatement".equals(method.getName())) { PreparedStatement statement = (PreparedStatement) result; String sql = (String) args[0]; return buildStatementProxy(PreparedStatement.class, new ProfilingPreparedStatementHandler(statement, sql)); } if ("createStatement".equals(method.getName())) { Statement statement = (Statement) result; return buildStatementProxy(Statement.class, new ProfilingStatementHandler(statement)); } return result; }
@Override public Connection getConnection(BasicDataSource dataSource) throws SQLException { return buildConnectionProxy(new ProfilingConnectionHandler(dataSource.getConnection())); }
@Override public Object invoke(Object target, Method method, Object[] args) throws Throwable { Object result = InvocationUtils.invokeQuietly(connection, method, args); if ("prepareStatement".equals(method.getName())) { PreparedStatement statement = (PreparedStatement) result; String sql = (String) args[0]; return buildStatementProxy(PreparedStatement.class, new ProfilingPreparedStatementHandler(statement, sql)); } if ("createStatement".equals(method.getName())) { Statement statement = (Statement) result; return buildStatementProxy(Statement.class, new ProfilingStatementHandler(statement)); } return result; }
@Override public Connection getConnection(BasicDataSource dataSource, String login, String password) throws SQLException { return buildConnectionProxy(new ProfilingConnectionHandler(dataSource.getConnection(login, password))); }
@Override public Connection getConnection(BasicDataSource dataSource) throws SQLException { return buildConnectionProxy(new ProfilingConnectionHandler(dataSource.getConnection())); }
@Override public Connection getConnection(BasicDataSource dataSource, String login, String password) throws SQLException { return buildConnectionProxy(new ProfilingConnectionHandler(dataSource.getConnection(login, password))); }