jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-616) Completeness/Freshness of Namespace Registry
Date Mon, 20 Nov 2006 13:55:03 GMT
    [ http://issues.apache.org/jira/browse/JCR-616?page=comments#action_12451306 ] 
angela commented on JCR-616:

i committed the patch with some modifications as a short term solution.

form my point of view, the patch addresses the problem only partially:
before throwing NamespaceException upon getPrefix and getURI the current solution checks if
NamespaceRegistry is really up to date.


- NamespaceRegistry.getURIs and NamespaceRegistry.getPrefixes will not return all prefixes/uris
  registered on the server, unless getPrefix or getURI has been called.
- reregistering of a existing URI with a new prefix might not be detected
- unregistering of an existing namespace will never result in an update of other NamespacRegistries
  but cause failures later on, when the API user relies on the NamespaceRegistry, which is

i'd say, that we need to come up with some notification approach (maybe related to the CacheBehaviour
recently introduced) that  addresses the problem. for the time being, reloading the mappings
defined on the server might be an acceptable workaround.

> Completeness/Freshness of Namespace Registry
> --------------------------------------------
>                 Key: JCR-616
>                 URL: http://issues.apache.org/jira/browse/JCR-616
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: SPI
>            Reporter: Julian Reschke
>         Attachments: diffs.txt
> We need to define the requirements on completeness and freshness of RepositoryService.getRegisteredNamespaces().
> Right now the optimistic assumption seems to be that an SPI provider is able to report
all namespaces that can occur in a repository beforehand. Even if it can do that (and I know
of potential targets for SPI that simply can't), this seems to be quite a waste of time if
these namespace prefixes aren't actually used later on.
> Furthermore, in SPI namespace prefixes aren't really relevant, except to enable the transient
layer to return "meaningful" prefixes instead of automatically generated ones.
> Therefore my propoal would be to:
> 1) Clarify that the Map returned from getRegisteredNamespaces() isn't required to be
> 2) Enhance JCR2SPI to auto-generate prefixes when it encounters namespaces not in the
> I expect this to also affect RepositoryService.(un)registerNamespace(...), but let's
discuss the underlying issue first...

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message