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-634
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Unassigned
Reporter: Fernando Padilla
Votes: 0
Watchers: 1

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

plugin extensions points are unordered, so we can't properly override core extensions with application specific ones

Created: 28/Jan/11 11:50 PM   Updated: 18/Feb/14 09:22 AM   Resolved: 19/May/11 07:28 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

 Description  « Hide
I believe datanucleus needs to have a way for it to load extensions in a reproducible manner.

The ordering of the extensions list was not-deterministic. So sometimes our extensions would override properly, other times they would be ignored (since the core definition our override ours).

We had to create our own OrderedNonManagedPluginRegistry, that would process the ExtensionPoint.getExtensions, to properly reorder them into a deterministic order.

We order all extensions that come from "datanucleus" jars to the top of the list. Then alphabetically after that. I believe datanucleus needs to have a way for it to load extensions in a deterministic manner.

Sort Order: Ascending order - Click to sort in descending order
Fernando Padilla added a comment - 28/Jan/11 11:54 PM
public class OrderedNonManagedPluginRegistry extends NonManagedPluginRegistry {

private boolean registeredExtensions;

public OrderedNonManagedPluginRegistry( ClassLoaderResolver clr ) {
super( clr, null );

public OrderedNonManagedPluginRegistry( ClassLoaderResolver clr, String bundleCheckType ) {
super( clr, bundleCheckType );

public void registerExtensions() {
if ( registeredExtensions ) {
registeredExtensions = true;

public void orderExtensions() {

Andy Jefferson added a comment - 29/Jan/11 12:47 PM
Irrespective of the proposal above, it would be nice to know *what* you want to "override", because maybe there's a reason why we don't provide a hook for it ;-)

Andy Jefferson added a comment - 28/Mar/11 04:10 PM
Without knowing the use-case can never be Major priority

Andy Jefferson added a comment - 19/May/11 07:28 AM