[
https://issues.apache.org/jira/browse/JCR-322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462752
]
Sandro Boehme commented on JCR-322:
-----------------------------------
>e.g. nodes of a specific type
>could have been already created transiently but not yet saved, such nodes
>could be in the transaction changelog, but not yet committed etc.
If I do understand you right, this is some kind of a "lost update problem"
because the transaction can use the node type with the commit after we
unregistered/changed it.
This means we should probably place a lock on the node type before
unregistering or
changing it and unlock it afterwards. The result of placing a lock on a node
type would
be that it cannot be used anymore and you get the lock token as soon as every
use
or transaction using this node type is finished.
Even though it's practically not easy to implement, do you think that could
theoretically work?
>just changing the type
>of such nodes doesn't work since child items depend on their defining node type
>as well (-> Property#getDefiniton()#getDeclaringNodeType()). just changing
>the node type is guaranteed to affect repository data integrity.
You are right all dependent types (subtypes, childtypes) would also need to be
changed to nt:base in this case.
The idea behind changing the type is just, that the data does not need to be
deleted if someone want to change (e.g. restructure) the nodetype. But at the
moment I think that doesn't make this issue easier to solve. ;-)
>see javadoc (i.e. the TODO comment) of
>NodeTypeRegistry#checkForReferencesInContent()
>for more details.
Thanks for the hint. Here is a link to make it clicky as a reference for this
issue:
http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/core/nodetype/NodeTypeRegistry.html#checkForReferencesInContent(org.apache.jackrabbit.name.QName)
> Support node type modification and removal
> ------------------------------------------
>
> Key: JCR-322
> URL: https://issues.apache.org/jira/browse/JCR-322
> Project: Jackrabbit
> Issue Type: New Feature
> Components: nodetype
> Affects Versions: 0.9, 1.0
> Reporter: Jukka Zitting
>
> There is currently no way to modify or remove registered node types. The
> existing reregister and unregister methods in NodeTypeRegistry throw "not
> yet implemented" exceptions for anything else than trivial node type changes.
> JSR 283 is working on an node type management API that we should ultimately
> implement.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira