question: public void enableConnectionGC ( ) throws IllegalStateException { if ( refQueue != null ) { throw new IllegalStateException ( "Connection GC already enabled." ) ; } poolLock . lock ( ) ; try { if ( numConnections > 0 ) { throw new IllegalStateException ( "Pool already in use." ) ; } } finally { poolLock . unlock ( ) ; } refQueue = new ReferenceQueue < Object > ( ) ; refWorker = new RefQueueWorker ( refQueue , this ) ; Thread t = new Thread ( refWorker ) ; t . setDaemon ( true ) ; t . setName ( "RefQueueWorker@" + this ) ; t . start ( ) ; }
target:  Enables connection garbage collection (GC). This method must be called immediately after creating the connection pool. It is not possible to enable connection GC after pool entries have been created. Neither is it possible to disable connection GC.