On Tue, Mar 17, 2009 at 12:03 AM, Stefan Seifert <[email protected]> wrote:
> with using manifest headers like
>
> Sling-Namespaces: pvplayground=http://www.playground.org/playground/1.0
> Sling-Nodetypes: SLING-INF/content/apps/playground/nodetypes/playground.cnd
>
> it is possible to automatically register namespaces and node types when the 
> bundle jar is deployed into sling.
> unfortunately node types are not re-registered if a new version of the bundle 
> is deployed (and they are not unregistered if the bundle is undeployed, but 
> this is perhaps by design to avoid conflicts with existing content). but the 
> lack of re-registering support really limits this feature preventing 
> deployment of updated content type definitions.
>
> the jackrabbit implementation seems to support re-registering (see 
> http://issues.apache.org/jira/browse/JCR-545), but unfortunately not via the 
> interface JackrabbitNodeTypeManager, but only in the implementation class 
> NodeTypeManagerImpl:
> registerNodeTypes(InputStream, String, boolean)
>
> setting the third parameter to true should re-register the content types.
>
> the registering of node types in sling is done in 
> org.apache.sling.jcr.base.NodeTypeLoader - a workaround could be to try to 
> cast the node type manager to NodeTypeManagerImpl and call this alterantive 
> method directly.

AFAIK that re-registering node types is only possible if no conflicts
arise with existing content, therefore it's not something that could
generally work (from Sling's point of view).

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to