< prev index next >
src/java.naming/share/classes/com/sun/jndi/ldap/pool/PoolCleaner.java
Print this page
rev 15155 : 8156824: com.sun.jndi.ldap.pool.PoolCleaner should clear its context class loader
Reviewed-by:
*** 28,38 ****
/**
* Thread that wakes up periodically and closes expired, unused connections.
*
* @author Rosanna Lee
*/
! final public class PoolCleaner extends Thread {
final private Pool[] pools;
final private long period;
/**
* @param period ms to wait between cleaning
--- 28,38 ----
/**
* Thread that wakes up periodically and closes expired, unused connections.
*
* @author Rosanna Lee
*/
! final public class PoolCleaner implements Runnable {
final private Pool[] pools;
final private long period;
/**
* @param period ms to wait between cleaning
*** 40,52 ****
*/
public PoolCleaner(long period, Pool[] pools) {
super();
this.period = period;
this.pools = pools.clone();
- setDaemon(true);
}
public void run() {
long threshold;
while (true) {
synchronized (this) {
// Wait for duration of period ms
--- 40,52 ----
*/
public PoolCleaner(long period, Pool[] pools) {
super();
this.period = period;
this.pools = pools.clone();
}
+ @Override
public void run() {
long threshold;
while (true) {
synchronized (this) {
// Wait for duration of period ms
< prev index next >