Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException using FBConnectionPoolDataSource() [JDBC250] #139

Closed
firebird-automations opened this issue Apr 26, 2012 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: Chiiwen Liou (i928)

Use 2.2 beta 's FBConnectionPoolDataSource() . I get ConcurrentModificationException when close a connection (jdbcConnection.close())

java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
at java.util.LinkedList$ListItr.remove(LinkedList.java:729)
at org.firebirdsql.ds.PooledConnectionHandler.closeStatements(PooledConnectionHandler.java:251)
at org.firebirdsql.ds.PooledConnectionHandler.handleClose(PooledConnectionHandler.java:161)
at org.firebirdsql.ds.PooledConnectionHandler.invoke(PooledConnectionHandler.java:109)
at $Proxy0.close(Unknown Source)

Commits: 6862469 e0fae4e

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Confirmed: missed a test for this. Workaround: Make sure you close all statements before closing the connection.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

A statementhandler would remove itself on close, causing the ConcurrentModificationException. Changed code to make a copy of the list to iterate over.

Added two tests to cover this case: one when the connection is closed by the caller, and one where the connection is closed by the pool (eg on obtaining a new connection from the same PooledConnection.

Will review tests for classes in org.firebirdsql.ds to see if I missed other testcases.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants