jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: unregisterNamespace and TCK
Date Sat, 18 Jun 2005 14:41:33 GMT
hi gena,

On 6/18/05, Gennady Azarenkov <gazarenkov@hotmail.com> wrote:
> hi,
> it seems that there are wrong behaviour in TCK's NamespaceRegistryTest
> (i guess because Jackrabbit does not check if the namespace is present in content
> in unregistering and either does not check item's namespace in remove()).
> so the sequence is:
> 1. NamespaceRegistry.registerNamespace("tst", "www.apache.org/jackrabbit/test/namespaceRegistryTest");
> 2. testRootNode.addNode("tst:root");
> 3. NamespaceRegistry.unregisterNamespace("tst"); (in NamespaceRegistryTest.tearDown())
> it seems should throw NamespaceException

according to "7.2 Adding and Deleting Namespaces" in the jsr 170 specification, 
"... An implementation may prevent the unregistering of any other
namespace for implementation-specific reasons by throwing a

that is exactly what jackrabbit does. maintaining ref# for namespaces is quite
complex and expensive. remember that, apart from item names, namespaces 
can also be referenced in property values of type PATH & NAME, in node type 
definitions, in value constraints of REFERNCE, PATH & NAME properties, etc.

we therefore chose to not maintain ref# of namespaces and consequentially
NamespaceRegistry.unregisterNamespace() is always throwing NamespaceException.


> regards,
> gena
> -------------------------
> Gennady Azarenkov
> eXo platform

View raw message