--- Berin Loritsch <[EMAIL PROTECTED]> wrote:
> J Aaron Farr wrote:
> > So to clarify:
> >
> > 1. The "prefered" method of Fortress is to just use "ROLE" not "ROLE +
> > Selector" to return a Selector.
> >
> > 2. I don't need to define selectors in the .role file.
> >
> > 3. I use a component's "id" attribute as the "hint" for Selector lookups.
>
> That is the current CVS actions, yes.
>
Sorry to keep asking for so much on this one, but I still need a little more
help.
In my original example we were modifying the SwingContainer class. So if I now
have two translators in the .xconf file with only the id different
("translator1" and "translator2") then I should be able to change this line:
m_translator =
(org.apache.avalon.fortress.examples.components.Translator)m_serviceManager.lookup(
org.apache.avalon.fortress.examples.components.Translator.ROLE );
To something like these two lines:
ServiceSelector selector = (ServiceSelector) m_serviceManager.lookup(
org.apache.avalon.fortress.examples.components.Translator.ROLE);
m_translator = (org.apache.avalon.fortress.examples.components.Translator)
sel.select("translator1");
That should work, shouldn't it? Instead I get:
org.apache.avalon.fortress.InitializationException: Cannot set up impl. Startup
lifecycle failure
...
Caused by: org.apache.avalon.framework.service.ServiceException: Component does
not exist
(Key='org.apache.avalon.fortress.examples.components.Translator/transl
ator1')
So apparently I'm still messing something up with the Selector. Any thoughts?
Thanks!
jaaron
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]