You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Daniel Ellermann <Da...@t-online.de> on 2001/08/01 19:03:45 UTC
Stores in scope
Hello,
currently I can assign a store to a scope in the following way:
store A for scope /
store B for scope /foo
As I've seen in the code at Uri.parseUri(), nodes in scope /foo are not
using store B, but store A! I think it would be better that the scope
definition for store B overwrites the definition of store A. Below you will
find my thought as a code snipped from Uri.parseUri():
while (scopes.hasMoreElements()) {
Scope courScope = scopes.nextScope();
try {
Store newStore = namespace.retrieveStore(courScope);
if (newStore != null) {
store = newStore;
scope = courScope;
// The PK in the current descriptorsStore is the
// portion of the URI relative
// to the Data Source.
this.pk = uri.substring(scope.toString().length())
.hashCode();
}
} catch (ServiceConnectionFailedException e) {
:
:
}
}
:
:
What's your opinion?
Danny =:-)
Re: Stores in scope
Posted by Remy Maucherat <re...@apache.org>.
> Hello,
>
> currently I can assign a store to a scope in the following way:
>
> store A for scope /
> store B for scope /foo
>
> As I've seen in the code at Uri.parseUri(), nodes in scope /foo are not
> using store B, but store A! I think it would be better that the scope
> definition for store B overwrites the definition of store A. Below you
will
> find my thought as a code snipped from Uri.parseUri():
/foo/* should be mapped to B.
Everything else should be mapped to A.
If it does not happen that way, then it's a bug ...
The mapping "algorithm" is not efficient at all, and will be rewritten.
Remy