JBoss.orgCommunity Documentation
eXo JCR implementation since 1.11 version have support of altering namespaces.
ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry(); namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr");
ExtendedNamespaceRegistry namespaceRegistry = (ExtendedNamespaceRegistry) workspace.getNamespaceRegistry(); namespaceRegistry.registerNamespace("newMapping", "http://dumb.uri/jcr"); namespaceRegistry.registerNamespace("newMapping2", "http://dumb.uri/jcr"); try { assertNull(namespaceRegistry.getURI("newMapping")); fail("exception should have been thrown"); } catch (NamespaceException e) { } assertNotNull(namespaceRegistry.getURI("newMapping2")); assertEquals("http://dumb.uri/jcr", namespaceRegistry.getURI("newMapping2"));