Issue Details (XML | Word | Printable)

Key: NUCCORE-585
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

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

Support per-Object locks

Created: 25/Oct/10 02:43 PM   Updated: 13/Nov/10 12:17 PM   Resolved: 08/Nov/10 09:36 AM
Component/s: Datastore Support, Persistence
Affects Version/s: None
Fix Version/s: 2.2.0.m3

 Description  « Hide
For JDO we currently provide global settings for whether to lock any object retrieval or not. It would be desirable to be able to specify this on a per-Object basis. This is for calls like PM.getObjectById() or EM.find(). But it could equally apply to fetch of fields.

One way would be to
1. Change ObjectManager.findObject to take in a lock argument
2. Change StoreManager.findObject to take in a lock argument
3. Change PersistenceHandler.findObject to take in a lock argument
4. Change PersistenceHandler.fetchObject to take in a lock argument

Another way would be to manage a Set of object ids of objects that need locking in ObjectManager. Since this would not change any APIs and so would not cause a rebuild/rerelease of all store plugins, this is the preferred approach.

Andy Jefferson made changes - 30/Oct/10 10:34 AM
Field Original Value New Value
Fix Version/s 2.2.0.m3 [ 11050 ]
Andy Jefferson added a comment - 08/Nov/10 09:36 AM
SVN trunk implements the mechanism for this

Andy Jefferson made changes - 08/Nov/10 09:36 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 13/Nov/10 12:17 PM
Status Resolved [ 5 ] Closed [ 6 ]