Issue Details (XML | Word | Printable)

Key: NUCCORE-1037
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Dan Haywood
Votes: 0
Watchers: 0
Operations

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

Provide an SPI to allow different implementations of JDOStateManager to be plugged in.

Created: 27/Apr/13 12:10 PM   Updated: 23/Jul/13 11:41 PM   Resolved: 27/Apr/13 03:02 PM
Component/s: None
Affects Version/s: 3.2.2
Fix Version/s: 3.2.3


 Description  « Hide
Apache Isis (http://isis.apache.org) integrates with DataNucleus, and requires to be notified of each object as it is instantiated by DN when being recreated as 'hollow'. This is done by the JDOStateManager.

By overriding ObjectProviderFactory, we have been enable to provide our own implementation (see
https://github.com/apache/isis/tree/master/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus), however the code is very hacky, and required us to also override NucleusContext and JDOPersistenceFactory.

In 3.2.2 there is a TODO in ObjectProviderFactory#getObjectProvider(...) to make the impl of JDOStateManager pluggable.

This issue is to implement that TODO so that we can add in our customization according to a supported SPI.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 27/Apr/13 03:02 PM
SVN trunk supports persistence property "datanucleus.objectProvider.className" (default = org.datanucleus.state.JDOStateManager) defining the ObjectProvider to use with a PMF/EMF

Dan Haywood added a comment - 27/Apr/13 03:13 PM
Thanks for actioning this so quickly, Andy. I'll test it when you push out 3.2.3.

Dan Haywood added a comment - 13/Jun/13 02:31 PM
Just to say, I've tested this out and all seems fine... thanks.

https://issues.apache.org/jira/browse/ISIS-438

Andy Jefferson added a comment - 16/Jul/13 01:50 PM
Note that in datanucleus-core 3.2.6 RDBMS will default to using ReferentialJDOStateManager and non-RDBMS datastores will default to using JDOStateManager as per NUCCORE-675, so if you have extended an existing DN StateManager you may need to update this

Dan Haywood added a comment - 23/Jul/13 11:41 PM
Thanks for the heads-up, Andy. I've raised a ticket my side to do this (https://issues.apache.org/jira/browse/ISIS-477).