DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
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.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 08/Nov/10 09:36 AM
SVN trunk implements the mechanism for this