Hi Yannick:
I have you message on the uyser list flagged for followup.
See notes in-line.
Yannick Menager wrote:
I've been looking everywhere, and I'm confused how I can implements plugin components in merlin.
Can you explain in more detail what you mean by a plugin. There are several access points in Merlin already and more comming - but an outline of what you want to do will help.
If I understand correctly:
- ServiceSelector is not supported by Merlin
Correct - the framework spec on this subject is not sufficient.
- Dependencies are hardcoded using the @avalon.dependency tag
So how can I implement runtime plugin functionality in my app ?
If you want to select something then presumably you have some selection criteria in mind. A generic container such as Merlin does not know what you intentions are nor anything about a selection criteria or candidate ranking strategy. What this means is that you need to supply this logic though a service defintion and an implementation.
I.e. define your seelction service:
public interface MySelectionService
{
Thing selectSomething( MyCriteria criteria );
}The define you component that implements MySelectionService and includes all of the selection semantics that are specific to the domain you are concerned with.
Limitation: as you mentioned Merlin requires that you declare dependencies for a component at the level of a type (i.e. dependencies are static). This means that if you want to slect against a merlin establish service, then you need to declare dependencies on all of the different potential types that you are going to select against. This is ok in scenarios such a keystor and you selecting between a personal keystore for signing as opposed to a keystore for trusted keys (i.e. the selection set is static). If the selection set is dynamic then you need to roll-your-own solution ... at least for the moment. A similar requirement exists in the Turbine Fulcrum project and its a subject I've been working on - i.e. if you not in a desperate hurry then you get this for free sometime soon.
Cheers, Steve.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
