Bugs item #1025403, was opened at 2004-09-09 20:52
Message generated for change (Comment added) made by ejort
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1025403&group_id=22866

>Category: JBossCX
Group: v4.0
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Simon (simonpero)
>Assigned to: Adrian Brock (ejort)
Summary: Bug and fix in WrapperConnection.java

Initial Comment:
In WrappedConnection.java, function close(), if there 
are still opened Statements, the code goes through all 
of them, and closes them. 
However, in the Statement.close() function, the code 
unregisters the Statement from the connection, which 
changes the HashMap of statements. If you know a little 
bit about Collections, needless to tell you more: the 
HashMap raises a ConcurrentModificationException the 
next time you call next() on the HashMap's Iterator!!!

The way to resolve this bug is easy: instead of closing a 
Statement while walking the HashMap, you put all the 
un-closed Statements in a List/Vector/Whatever, and 
you can then safely close them in a second loop...

(Of course, this bug will never occur if one closes his 
own Statements, but not everyone can code 
appropriately...:-)

----------------------------------------------------------------------

>Comment By: Adrian Brock (ejort)
Date: 2004-09-09 21:30

Message:
Logged In: YES 
user_id=9459

Already fixed, try 4.0.0RC2

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1025403&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to