Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358612 - ClientSession:releaseReadConnection accidentally releases write connections
Summary: ClientSession:releaseReadConnection accidentally releases write connections
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 11:47 EDT by Michael Pflueger CLA
Modified: 2022-06-09 10:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Pflueger CLA 2011-09-22 11:47:48 EDT
Build Identifier: 2.3.1 Nightly

I get a DataAccessor not connected exception when using cursors in a transaction context repeatedly.
My write connection is closed after 2 queries and I get said DataAccessor disconnected exception. I also think I found the bug in the code, in ClientSession.java, method releaseReadConnection.

        // If the cursor's connection is the write connection, then do not release it.
        if ((this.writeConnections != null) && this.writeConnections.containsKey(connection)) {

However, the last containsKey should probably be containsValue - I changed it and the bug disappears here.

Reproducible: Always

Steps to Reproduce:
1. use cursors in a transaction-environment
2. query several times, the third fails, maybe depending on the number of setup write connections
3.
Comment 1 Tom Ware CLA 2011-10-31 13:30:54 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:31:36 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink