[EMAIL PROTECTED] wrote:
Hello,A service selector is a service interface that is supplied by a container to a component. In the Fortress container a selector is established by appending the "Selector" string to the key passed to the lookup operation on the supplied service manager. In Merlin a selector is just another service interface (which means you provide the component implementation that declares a bunch of depndencies and responds to selection requests by supplying one of the dependent services). In both cases there is not lifestyle or lifecycle management necessary.
I was looking at the
org.apache.avalon.cornerstone.blocks.datasources.DefaultDataSourceSelector class
in order to get inspiration to do a ServiceSelector that must instanciate the
components it will give based on configuration.
Just to be sure that i did not miss anything... (because everything is not clear
to me)
With the sole framework:
* There is for now no possibility to implement a ServiceSelector without having
to do the lifestyle and lifecycle management "manually" ?
If yes,
* The core assembly will be integrated in the framework in order to enable
ServiceSelector implementors to delegate the lifestyle and lifecycle management ?
No sure what you mean by the "core assembly" - can you explain more fully?
The "framework" as we know it today in Avalon is basically a collection of interfaces and classes that deal with the object supplied by a container to a component. It does not include container related (with a minor exception of one utility class). A container API is something else altogether and would not fall into the classic "framework" space. The framework is about the contract between container and component whereas what you are describing is something concerning a container implementation interface.or, * A single ContainerAbstraction service interface will be integrated in the framework with no implementation, for any container to implement ?
If it is the second solution that has been choosen (in order to not impose too
much coopling between containers and framework), i can't find any interface for
that kind of service. As i need it, i try to specify it for it to be enough
general. Could you give me some advices ??
public interface ContainerAbstraction
{
public Object get(String implementationKey,
Context context, Logger logger, Configuration configuration);
public void release(Object object);
}
The above interface looks alot like a very simplified version of the
Appliance interface. I.e. your requesting the establishment of a
compoent relative to a particular name, context, logger and
configuration, and your subsequently notifying the manager of the
release of that object.Cheers, Steve.
--
Stephen J. McConnell
mailto:[EMAIL PROTECTED]
http://www.osm.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
