Issue Details (XML | Word | Printable)

Key: NUCCORE-603
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Tom Zurkan
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

when the property datanucleus.connection.nontx.releaseAfterUse=false the connection is never closed and you can run out of connections.

Created: 23/Nov/10 09:57 PM   Updated: 10/Dec/10 07:48 AM   Resolved: 25/Nov/10 03:26 PM
Component/s: None
Affects Version/s: 2.2.0.m3
Fix Version/s: 2.2.0.release

File Attachments: 1. Java Source File ManagedConnectionTest.java (2 kB)
2. File objmangerimpl.diff (1 kB)


Datastore: MySQL


 Description  « Hide
including a unit test. the key is just to make the number of times in the for loop greater than datanucleus.connectionPool.maxActive.

Sort Order: Ascending order - Click to sort in descending order
Tom Zurkan added a comment - 23/Nov/10 09:58 PM
this unit test will fail because the connection is never closed. the connection should be closed when the pm is closed.

Tom Zurkan added a comment - 23/Nov/10 10:57 PM
i am supplying the svn diff of the ObjectManagerImpl.java in core. This change did the trick. Feedback welcome! :)

Andy Jefferson added a comment - 25/Nov/10 03:26 PM
Thx for the report. Provided fix would go off and allocate a connection if not yet allocated hence hitting performance at close. Better way was just to use the existing listener mechanism for when an ObjectManager is closing and let the ConnectionManager clean that ObjectManager's information out.