I got hit by JCR-1558[1] (Namespaces aren't registered on cluster nodes) and started to look at how Sling could potentially work around this problem.
For those that don't know, in Sling, namespaces can be registered via an OSGi bundle header (Sling-Namespaces). Namespaces registered in this fashion are added to the Namespace Registry when a session is requested. However, as seen in JCR-1558, this is too late - the namespace registry needs to be populated at the time of workspace initialization. For Sling, this is an entirely opaque process - we just call RepositoryImpl.create() and get a Repository. In this thread: http://markmail.org/message/r66bwh3tkzu46tam, there's discussion of working around the problem by reregistering the custom namespaces on node start, but I don't see how that's possible. The only valid workaround I've found is to manually modify the ns_idx.properties and ns_reg.properties files manually which doesn't seem like a solution we would codify in Sling. Any ideas? Thanks, Justin [1] https://issues.apache.org/jira/browse/JCR-1558
