public static ThreadInfo from(Thread t) { return new ThreadInfo(t.getName(), t.getId()); }
public ResourceCreationLocation(String message, Exception cause) { super(message, cause); this.creatingThreadInfo = ThreadInfo.from(Thread.currentThread()); }
@Override public void close() { timerKey.stop(); try { stmt.close(); results.close(); hasBeenClosed = true; long elapsed = System.currentTimeMillis() - creationLocation.getCreatingThreadInfo().getTimestamp(); log.debug("Closed {} after {}ms", this, elapsed); } catch(SQLException sqlex) { log.error("Caught SQLException", sqlex); //$NON-NLS-1$ } }
public ResourceCreationLocation(String message, Exception cause) { super(message, cause); this.creatingThreadInfo = ThreadInfo.from(Thread.currentThread()); }
public static ThreadInfo from(Thread t) { return new ThreadInfo(t.getName(), t.getId()); }
@Override public void close() { timerKey.stop(); try { stmt.close(); results.close(); hasBeenClosed = true; long elapsed = System.currentTimeMillis() - creationLocation.getCreatingThreadInfo().getTimestamp(); log.debug("Closed {} after {}ms", this, elapsed); } catch(SQLException sqlex) { log.error("Caught SQLException", sqlex); //$NON-NLS-1$ } }