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-707
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Daniel Baldes
Votes: 0
Watchers: 0

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

Globally support a priority attribute for extensions

Created: 03/May/11 11:36 AM   Updated: 18/Feb/14 09:22 AM   Resolved: 09/May/11 09:57 AM
Component/s: None
Affects Version/s: 2.2.3
Fix Version/s: 3.0.0.m4

File Attachments: 1. Text File priority.patch (9 kB)

Forum Thread URL:,6683

 Description  « Hide
As discussed in the DN forum (see forum thread URL).

The plugin manager should support to set the priority of an extension over "default" extensions.

For example, the RDBMS datastore just grabs the first ConnectionFactory extension it encounters, which happens to be the one provided by datanucleus-rdbms itself (ConnectionFactoryImpl), regardless of whether there is another connection factory extension present.

Daniel Baldes added a comment - 03/May/11 11:39 AM
The attached patch for the datanucleus-core 2.2 branch implements support for a "priority" attribute for any extension.

New behavior:

PluginManager.getConfigurationElement(s)ForExtension methods return extensions with a higher value of the "priority" attribute first. Extensions with no priority attribute are considered having priority = 0. If no priority is defined, extensions are returned in the order they are encountered (old behavior).

Daniel Baldes made changes - 03/May/11 11:39 AM
Field Original Value New Value
Attachment priority.patch [ 11440 ]
Andy Jefferson added a comment - 03/May/11 03:18 PM - edited
Thx. I'll be applying it on 3.0 (trunk) only. To swap to your "priority" usage I'll also need to change (remove) all current usage of attribute "override", and the DatastoreAdapter "priority" handling. Additionally, all src/schema files will need attribute "priority" adding otherwise Eclipse shows "Illegal attribute 'priority'"

Andy Jefferson added a comment - 09/May/11 09:57 AM
Patch applied in 3.0m4. Didn't have time to do the cleanup of existing override methods, so raised those as

Andy Jefferson made changes - 09/May/11 09:57 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0.0.m4 [ 11220 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 09/May/11 09:58 AM
Status Resolved [ 5 ] Closed [ 6 ]
Andy Jefferson made changes - 18/Feb/14 09:22 AM
Component/s Plugins [ 10153 ]