Hi Oliver, Am Donnerstag, den 17.04.2008, 13:17 +0200 schrieb Oliver Lietz: > hello all, > > why are there two Loaders? I'm asking because initial content (with custom > node types and namespace) loading from bundle by Loader from resource fails > due to missing namespace handling. The necessary methods are present in > Loader from base, wonder why they are not used.
This is historic. Initially there was just one loader (in the jcr/resource module) which contained node type registration and initial content loading. This loader has been split some time ago, such that node type registration, which is a repository-wide operation, is part of repository "initialization" in the jcr/base module, and the initial content loading, which is specific to the Sling workspace, remained in the jcr/resource module. Namespace handling is split: One is the namespaces used for the node type registration. These namespaces should be listed in the node type definition file (aka CND-file). The other part is the namespaces available in the JCR sessions. These namespaces should be declared in a bundle - mostly the bundle making the initial node type registration - in the Sling-Namespaces header. See for example the jcr/resource module [1] itself which defines the sling namespace. Now, the namespaces are defined in a JCR session emitted from the session pool manager by calling the Loader.defineNamespacePrefixes method on the session to be returned for login. This should actually work pretty fine. Nevertheless, if you encounter issues, you are very welcome to raise a JIRA so that we can fix this. Hope this helps. Regards Felix [1] http://svn.apache.org/repos/asf/incubator/sling/trunk/jcr/resource/pom.xml
