Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15906/src/java/org/logicalcobwebs/proxool
Modified Files:
AbstractProxyStatement.java
Log Message:
Support new sqlCalls list and isTrace() is now true if the connection pool is being listened to or if trace is on. It no longer depends on the log level. This is because the sqlCalls are available in AdminServlet and not just the logs.
Index: AbstractProxyStatement.java
===================================================================
RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/AbstractProxyStatement.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** AbstractProxyStatement.java 26 Sep 2005 10:01:31 -0000 1.19
--- AbstractProxyStatement.java 7 Oct 2005 08:25:15 -0000 1.20
***************
*** 183,187 ****
// Send to any listener
connectionPool.onExecute(sqlLog.toString(), (System.currentTimeMillis() - startTime), exception);
- ((ProxyConnection) proxyConnection).setLastSqlCall(sqlLog.toString());
}
--- 183,186 ----
***************
*** 195,198 ****
--- 194,203 ----
}
+ protected void startExecute() {
+ if (isTrace()) {
+ ((ProxyConnection) proxyConnection).addSqlCall(sqlLog.toString());
+ }
+ }
+
/**
* Get the parameters that have been built up and use them to fill in any parameters
***************
*** 244,249 ****
protected boolean isTrace() {
! boolean isTrace = getConnectionPool().isConnectionListenedTo() || (getConnectionPool().getDefinition().isTrace() && getConnectionPool().getLog().isDebugEnabled());
! return isTrace;
}
--- 249,253 ----
protected boolean isTrace() {
! return getConnectionPool().isConnectionListenedTo() || (getConnectionPool().getDefinition().isTrace());
}
***************
*** 261,264 ****
--- 265,269 ----
return DATE_FORMAT.format(date);
}
+
}
***************
*** 267,270 ****
--- 272,278 ----
Revision history:
$Log$
+ Revision 1.20 2005/10/07 08:25:15 billhorsman
+ Support new sqlCalls list and isTrace() is now true if the connection pool is being listened to or if trace is on. It no longer depends on the log level. This is because the sqlCalls are available in AdminServlet and not just the logs.
+
Revision 1.19 2005/09/26 10:01:31 billhorsman
Added lastSqlCall when trace is on.
|