[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ProxyStatement.java,1.28,1.29
UNMAINTAINED!
Brought to you by:
billhorsman
From: <bil...@us...> - 2005-10-07 08:15:09
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14122/src/java/org/logicalcobwebs/proxool Modified Files: ProxyStatement.java Log Message: Update sqlCalls /before/ we execute so that we can see what slow calls are doing before they finish. Index: ProxyStatement.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxyStatement.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ProxyStatement.java 13 Jul 2004 21:06:18 -0000 1.28 --- ProxyStatement.java 7 Oct 2005 08:15:00 -0000 1.29 *************** *** 59,62 **** --- 59,82 ---- Method concreteMethod = InvokerFacade.getConcreteMethod(getStatement().getClass(), method); + + // This gets called /before/ the method has run + if (concreteMethod.getName().equals(ADD_BATCH_METHOD)) { + // If we have just added a batch call then we need to update the sql log + if (argCount > 0 && args[0] instanceof String) { + setSqlStatementIfNull((String) args[0]); + } + appendToSqlLog(); + } else if (concreteMethod.getName().equals(EXECUTE_BATCH_METHOD)) { + // executing a batch should do a trace + startExecute(); + } else if (concreteMethod.getName().startsWith(EXECUTE_FRAGMENT)) { + // executing should update the log and do a trace + if (argCount > 0 && args[0] instanceof String) { + setSqlStatementIfNull((String) args[0]); + } + appendToSqlLog(); + startExecute(); + } + // We need to remember an exceptions that get thrown so that we can optionally // pass them to the onExecute() call below *************** *** 122,140 **** } finally { ! if (concreteMethod.getName().equals(ADD_BATCH_METHOD)) { ! // If we have just added a batch call then we need to update the sql log ! if (argCount > 0 && args[0] instanceof String) { ! setSqlStatementIfNull((String) args[0]); ! } ! appendToSqlLog(); ! } else if (concreteMethod.getName().equals(EXECUTE_BATCH_METHOD)) { ! // executing a batch should do a trace ! trace(startTime, exception); ! } else if (concreteMethod.getName().startsWith(EXECUTE_FRAGMENT)) { ! // executing should update the log and do a trace ! if (argCount > 0 && args[0] instanceof String) { ! setSqlStatementIfNull((String) args[0]); ! } ! appendToSqlLog(); trace(startTime, exception); } --- 142,147 ---- } finally { ! // This gets called /after/ the method has run ! if (concreteMethod.getName().equals(EXECUTE_BATCH_METHOD) || concreteMethod.getName().startsWith(EXECUTE_FRAGMENT)) { trace(startTime, exception); } *************** *** 151,154 **** --- 158,164 ---- Revision history: $Log$ + Revision 1.29 2005/10/07 08:15:00 billhorsman + Update sqlCalls /before/ we execute so that we can see what slow calls are doing before they finish. + Revision 1.28 2004/07/13 21:06:18 billhorsman Fix problem using injectable interfaces on methods that are declared in non-public classes. |