[ http://issues.apache.org/jira/browse/JCR-274?page=all ]
Sandro Boehme updated JCR-274:
------------------------------
Attachment: EffectiveNodeType.patch
NodeTypeRegistry.patch
EffectiveNodeTypeCache.java
o The registration of the internal node types at start up of the repository is
left as it is, as good as possible.
o The creation of the effective node types is left as it is, as good as
possible.
o The patch adds a cloned EffectiveNodeTypeCache object and a cloned map of
registered NodeTypeDefs to the context of the node type registration.
All node type definitions specified in the registerNodeTypes(Collection) method
call are temporarily added to this map of registered NodeTypeDefs.
The validation of the node types uses the registration context and therefore
also considers all new node types no matter if they are
cyclic dependend like the one this issue is about. Stefans nice checks for
circular node auto creation and circular inheritance should still work.
Only if all node types definitions are valid and all node types could be
created they are finally added to the repository.
A failed validation or registration does not effect the repository.
That also fixes JCR-274.
Thank you Stefan, for the support behind the scenes.
> NodeTypeRegistry.registerNodetypes(Collection) should not register a partial
> set
> --------------------------------------------------------------------------------
>
> Key: JCR-274
> URL: http://issues.apache.org/jira/browse/JCR-274
> Project: Jackrabbit
> Type: Improvement
> Components: nodetype
> Environment: r345037
> Reporter: Tobias Bocanegra
> Assignee: Stefan Guggisberg
> Priority: Minor
> Fix For: 1.0
> Attachments: EffectiveNodeType.patch, EffectiveNodeTypeCache.java,
> NodeTypeRegistry.patch
>
> the javadoc says:
> * Note that in the case an exception is thrown, some node types might
> have
> * been nevertheless successfully registered.
> the problem hereby is, that it cannot be determined easily, what nodetypes
> could be registered, and which couldnt. i would rather prefer a
> all-or-nothing behaviour.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira