[Opensource] connection pool exception
Michael Rimov
rimovm at centercomp.com
Sun Jun 2 05:50:51 PDT 2002
At 11:36 PM 5/30/2002 -0700, you wrote:
>Hi Mike,
>
>You are partly correct. If it is synchronized, it will take care
>of simultaneous modifications. But this is within the
>synchronized block. Problem is in clean() method. In the
>for-loop(which is in the synchronized block) itself there is one
>statement which removes elements from Hashmap ie:
>inUse.remove(new Integer(oneConnection.getId()))
>This has to be moved out of the loop, otherwise you will get
>ConcurrentModificationException.
Aha! Thank you very much for the clarification. I have put your clean()
version in CVS and added your contribution to the changelog. Thanks again!
-Mike
More information about the Opensource
mailing list