public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  Monitor mon=null;
  if (params.isInterfaceEnabled && params.isEnabled) {
    mon=MonitorFactory.start(labelerInt.getSummaryLabel(method));
  }
  try {
    if (method.equals(EQUALS_METHOD))     return Boolean.valueOf(equals(args[0]));
 else     return method.invoke(monitoredObj,args);
  }
 catch (  InvocationTargetException e) {
    if (params.isEnabled) {
      String sqlMessage="";
      String detailStackTrace=null;
      Throwable rootCause=e.getCause();
      if (rootCause instanceof SQLException) {
        SQLException sqlException=(SQLException)rootCause;
        sqlMessage=",ErrorCode=" + sqlException.getErrorCode() + ",SQLState="+ sqlException.getSQLState();
      }
      trackException(rootCause,method,sqlMessage);
    }
    throw e.getCause();
  }
 finally {
    if (mon != null)     mon.stop();
  }
}

public Object invoke ( Object proxy , Method method , Object [ ] args ) throws Throwable { Monitor mon = null ; if ( params . isInterfaceEnabled && params . isEnabled ) { mon = MonitorFactory . start ( labelerInt . getSummaryLabel ( method ) ) ; } try { if ( method . equals ( EQUALS_METHOD ) ) return Boolean . valueOf ( equals ( args [ 0 ] ) ) ; else return method . invoke ( monitoredObj , args ) ; } catch ( InvocationTargetException e ) { if ( params . isEnabled ) { String sqlMessage = "" ; String detailStackTrace = null ; Throwable rootCause = e . getCause ( ) ; if ( rootCause instanceof SQLException ) { SQLException sqlException = ( SQLException ) rootCause ; sqlMessage = ",ErrorCode=" + sqlException . getErrorCode ( ) + ",SQLState=" + sqlException . getSQLState ( ) ; } trackException ( rootCause , method , sqlMessage ) ; } throw e . getCause ( ) ; } finally { if ( mon != null ) mon . stop ( ) ; } }
method that monitors method invocations of the proxied interface . this method is not explicitly called . the monproxy class automatically calls it .
