Dependencies in block
niclas at hedhman.org
Thu Nov 18 01:56:07 EST 2004
On Thursday 18 November 2004 14:40, Dan Gould wrote:
> Anyone have any clue as to why this might happen or how to fix it? (As
> you might guess, I'm trying to let you choose services to deploy at
> composition-time rather than at compile-time; eventually I'd like it to
> also be possible during run-time, but I'll worrry about that later).
This is the expected behaviour, and will not be "fixed", as it will
effectively tear down the robustness that the Metro platform is trying to
You declare your dependencies in the source, but you declare which SERVICE,
not which component, so you can still wait to put in the dependency until
In some cases you may want to have an optional dependency, in which case you
put in optional="true" in the @metro.dependency, in which case null will be
returned instead of a ServiceException.
And finally, if you have a 1..n relationship, you do one of two things;
The (n) components declare the dependency on (1), looks it up and calls a
registration method in the service interface at (1).
You create a service selector, have the (n) components to declare a dependency
on that, call a registration method at the service selector. The (1)
component declare a dependency on the service selector, looks it up, and
calls one or more query methods to be handed the component it needs to
resolve at runtime.
/ http://www.bali.ac /
/ http://niclas.hedhman.org /
More information about the support-dpml