com.jolbox.bonecp
Class CloseThreadMonitor

java.lang.Object
  extended by com.jolbox.bonecp.CloseThreadMonitor
All Implemented Interfaces:
java.lang.Runnable

public class CloseThreadMonitor
extends java.lang.Object
implements java.lang.Runnable

Thread that monitors another thread and displays stack trace if getConnection() was called without the corresponding close(). For debug purposes only.

Author:
Wallace

Constructor Summary
CloseThreadMonitor(java.lang.Thread threadToMonitor, ConnectionHandle connectionHandle, java.lang.String stackTrace, long closeConnectionWatchTimeout)
           
 
Method Summary
 void run()
          
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseThreadMonitor

public CloseThreadMonitor(java.lang.Thread threadToMonitor,
                          ConnectionHandle connectionHandle,
                          java.lang.String stackTrace,
                          long closeConnectionWatchTimeout)
Parameters:
threadToMonitor - Thread to wait for termination
connectionHandle - connection handle that we are monitoring
stackTrace - where the getConnection() request started off.
closeConnectionWatchTimeout - no of ms to wait in thread.join(). 0 = wait forever
Method Detail

run

public void run()

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()


Copyright © 2009-2011 JolBox. All Rights Reserved.