org.logicalcobwebs.proxool
Class ProxyStatement

java.lang.Object
  extended by org.logicalcobwebs.proxool.AbstractProxyStatement
      extended by org.logicalcobwebs.proxool.ProxyStatement

 class ProxyStatement
extends AbstractProxyStatement

Delegates to Statement for all calls. But also, for all execute methods, it checks the SQLException and compares it to the fatalSqlException list in the ConnectionPoolDefinition. If it detects a fatal exception it will destroy the Connection so that it isn't used again.

Version:
$Revision: 1.32 $, $Date: 2006/03/03 09:58:26 $
Author:
billhorsman, $Author: billhorsman $ (current maintainer)

Field Summary
private static java.lang.String ADD_BATCH_METHOD
           
private static java.lang.String CLOSE_METHOD
           
private static java.lang.String EQUALS_METHOD
           
private static java.lang.String EXECUTE_BATCH_METHOD
           
private static java.lang.String EXECUTE_FRAGMENT
           
private static java.lang.String FINALIZE_METHOD
           
private static java.lang.String GET_CONNECTION_METHOD
           
private static Log LOG
           
private static java.lang.String SET_NULL_METHOD
           
private static java.lang.String SET_PREFIX
           
 
Constructor Summary
ProxyStatement(java.sql.Statement statement, ConnectionPool connectionPool, ProxyConnectionIF proxyConnection, java.lang.String sqlStatement)
           
 
Method Summary
 java.lang.Object intercept(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args, MethodProxy proxy)
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class org.logicalcobwebs.proxool.AbstractProxyStatement
appendToSqlLog, close, equals, getConnection, getConnectionPool, getDateAsString, getDelegateStatement, getStatement, isTrace, putParameter, setSqlStatementIfNull, startExecute, testException, trace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG

EXECUTE_FRAGMENT

private static final java.lang.String EXECUTE_FRAGMENT
See Also:
Constant Field Values

EXECUTE_BATCH_METHOD

private static final java.lang.String EXECUTE_BATCH_METHOD
See Also:
Constant Field Values

ADD_BATCH_METHOD

private static final java.lang.String ADD_BATCH_METHOD
See Also:
Constant Field Values

EQUALS_METHOD

private static final java.lang.String EQUALS_METHOD
See Also:
Constant Field Values

CLOSE_METHOD

private static final java.lang.String CLOSE_METHOD
See Also:
Constant Field Values

GET_CONNECTION_METHOD

private static final java.lang.String GET_CONNECTION_METHOD
See Also:
Constant Field Values

FINALIZE_METHOD

private static final java.lang.String FINALIZE_METHOD
See Also:
Constant Field Values

SET_NULL_METHOD

private static final java.lang.String SET_NULL_METHOD
See Also:
Constant Field Values

SET_PREFIX

private static final java.lang.String SET_PREFIX
See Also:
Constant Field Values
Constructor Detail

ProxyStatement

public ProxyStatement(java.sql.Statement statement,
                      ConnectionPool connectionPool,
                      ProxyConnectionIF proxyConnection,
                      java.lang.String sqlStatement)
Method Detail

intercept

public java.lang.Object intercept(java.lang.Object obj,
                                  java.lang.reflect.Method method,
                                  java.lang.Object[] args,
                                  MethodProxy proxy)
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Throws:
java.lang.Throwable