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.

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 made changes - 23/Nov/10 09:58 PM
Field Original Value New Value
Attachment ManagedConnectionTest.java [ 11315 ]
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! :)

Tom Zurkan made changes - 23/Nov/10 10:57 PM
Attachment objmangerimpl.diff [ 11316 ]
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.

Andy Jefferson made changes - 25/Nov/10 03:26 PM
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 2.2.0.release [ 10931 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 10/Dec/10 07:48 AM
Status Resolved [ 5 ] Closed [ 6 ]