You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using furiosObject Pool 1.1. and set the poolsize with this settings :
poolSettings = new PoolSettings<ConnectionPoolSocket>(
...
});
// Add some settings
poolSettings.min(0).max(6);
poolSettings.validateWhenReturn(false);
because I have a Socket Connection inside my pool that rarely used and I want
to close if is not used.
When test my code with :
ExecutorService threadExecutor = Executors.newFixedThreadPool(4);
for (int i = 0; i < 30; i++) {
threadExecutor.submit(this);
}
threadExecutor.shutdown();
try {
Thread.sleep(60000);
} catch (InterruptedException e) {
}
I see myPool grow correctly to 4 connections but in the sleep time only 3
connections are closed and 1 is alive.
Any hint to do that ?
Thank you very much and congratulations for the excellent work
Original issue reported on code.google.com by alessand...@gmail.com on 28 Dec 2012 at 10:32
The text was updated successfully, but these errors were encountered:
The problem is in PoolSettings
public PoolSettings<T> min(final int min) {
this.min = min;
if (maxIdle < min) {
maxIdle = min;
}
if (max>0 && min > max) {
max(min);
}
return this;
}
modifing in
public PoolSettings<T> min(final int min) {
this.min = min;
//if (maxIdle < min) {
maxIdle = min;
//}
if (max>0 && min > max) {
max(min);
}
return this;
}
all works
Original comment by alessand...@gmail.com on 28 Dec 2012 at 1:51
Original issue reported on code.google.com by
alessand...@gmail.com
on 28 Dec 2012 at 10:32The text was updated successfully, but these errors were encountered: