Details

Description

Access to the the list of event listeners is not synchronized properly.

Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

Knut Anders Hatlen
added a comment - 23/Jan/08 13:33 The patch looks fine to me.
Since the list is now guarded by synchronization on the pooled connection, couldn't it be changed from Vector to ArrayList? (Should be safe to do with listeners_ in the parent class as well.)

I have incorporated you suggestion about replacing Vector with ArrayList in revision 1b.

Regarding the suggested changes in the parent class, there are some methods that are synchronized and some that are not. A patch could be attached to the subtask of this issue. Feel free to add it, or maybe I will if I get around to it.

Kristian Waagan
added a comment - 23/Jan/08 13:58 Thanks for commenting on the patch Knut Anders.
I have incorporated you suggestion about replacing Vector with ArrayList in revision 1b.
Regarding the suggested changes in the parent class, there are some methods that are synchronized and some that are not. A patch could be attached to the subtask of this issue. Feel free to add it, or maybe I will if I get around to it.

Kristian Waagan
added a comment - 23/Jan/08 14:13 - edited Committed 'derby-3308-1b-eventlisteners_synchronization.diff' to trunk with revision 614536.
I don't expect there will be more work on this issue, will close in a few days.