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-issue-importer opened this issue Apr 26, 2012 · 6 comments

Comments

@firebird-issue-importer

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 28, 2012

Modified by: @mrotteveel

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 28, 2012

Modified by: @mrotteveel

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 28, 2012

Commented by: @mrotteveel

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 28, 2012

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 27, 2012

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 18, 2012

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants