You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by James Carman <ja...@carmanconsulting.com> on 2004/07/28 17:23:42 UTC

Merging Registries?

Is there any way to "merge" registries?  Suppose I have a module descriptor
that I want to use to build a stateful, session-specific registry (the
services contained in it may safely maintain state if they wish).  Now, some
of the services that are defined in this module require  other services
which are safely shared and I do not want to duplicate them.  So, what I
want is to be able to create one GLOBAL registry and be able to build this
session-specific registry so that it uses some of the services in the global
registry.  Does that make sense?  Here's what I had in mind...


Registry globalRegistry = ...;

RegistryBuilder builder = new RegistryBuilder();
builder.addExistingRegistry( globalRegistry );
builder.processModules( someResolver );
Registry userRegistry = builder.constructRegistry(Locale.getDefault());

So, when the "userRegistry" is built, the RegistryBuilder will use the
"globalRegistry" to resolve service dependencies.  Is there any way to do
such a thing?



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Merging Registries?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Nope; nothing like this.  May be useful, but doesn't exist.  I can
imagine ways this would work, however, where a service factory in the
"child" Registry could expose services provided by the "parent"
Registry.

On Wed, 28 Jul 2004 11:23:42 -0400, James Carman
<ja...@carmanconsulting.com> wrote:
> Is there any way to "merge" registries?  Suppose I have a module descriptor
> that I want to use to build a stateful, session-specific registry (the
> services contained in it may safely maintain state if they wish).  Now, some
> of the services that are defined in this module require  other services
> which are safely shared and I do not want to duplicate them.  So, what I
> want is to be able to create one GLOBAL registry and be able to build this
> session-specific registry so that it uses some of the services in the global
> registry.  Does that make sense?  Here's what I had in mind...
> 
> Registry globalRegistry = ...;
> 
> RegistryBuilder builder = new RegistryBuilder();
> builder.addExistingRegistry( globalRegistry );
> builder.processModules( someResolver );
> Registry userRegistry = builder.constructRegistry(Locale.getDefault());
> 
> So, when the "userRegistry" is built, the RegistryBuilder will use the
> "globalRegistry" to resolve service dependencies.  Is there any way to do
> such a thing?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org