yeah, your configuration files works,but then
roles files written for ECM should be different in format from new files written for fortress.
By having this form of role description , I guess all the implementation classes of a service which share the same role name should have 'root-level' configurations instead of childern level configurations of the configuration of the Service they implmented like that in ECM role files. So a roles file and a xonf file maybe like this:
<role name="Runner">
<component shorthand="DefaultRunner"
class="DefaultRunner"
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"
/>
<component shorthand="AnotherRunner"
class="AnotherRunner"
handler="org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"
/>
</role>
<my-system> <DefaultRunner id="default"/> <AnotherRunner id="Another"/> </my-system>
Is this right?
And, when I call ServiceManager.lookup("Runner") method, what it will return me?, in ECM, for this situation, I would get an ExcaliburComponentSelector instance because the configuration would be like this:
<role
name="Runner"
shorthand="Runner"
default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector">
<hint shorthand="DefaultRunner" class="DefaultRunner"/> <hint shorthand="AnotherRunner" class="AnotherRunner"/> </role>
and the .xconf file
<my-system> <Runner> <DefaultRunner/> <AnotherRunner/> </Runner> </my-system>
then use that selector, I can select an expected implementation component by passing the selector the value of the hints. So can fortress return me a ServiceSelector with the configuration files I have at the beginging of this text, and then I can select using the shorthands ?
And, what is the default handler class if I havent an explicit handler class?
Thanks Mike.
From: "Farr, Aaron" <[EMAIL PROTECTED]>your
Reply-To: "Avalon framework users" <[EMAIL PROTECTED]>
To: "'Avalon framework users'" <[EMAIL PROTECTED]>
Subject: RE: why I cant find this service
Date: Fri, 9 Jan 2004 14:00:50 -0800
> -----Original Message----- > From: Mu Mike [mailto:[EMAIL PROTECTED]
I don't think anyone has answered you yet, so here's my shot. I think
problems are in the configuration files (which have changed a little)."org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"
> > This is my report.roles file > > <?xml version="1.0"?> > <role-list> > <role > name="Runner" > shorthand="runner" > default-class="DefaultRunner"/> > </role-list>
Change this to:
<?xml version="1.0"?> <role-list logger="system.roles">
<role name="Runner">
<component shorthand="runner"
class="DefaultRunner"
handler=
to/> </role>
</role-list>
> This is my system.xconf file > > <my-system> > <runner/> > </my-system>
This should be changes slightly to:
<?xml version="1.0"?> <my-system> <runner id="default"/> </my-system>
I think all components need an 'id' attribute now. It serves as an alias
the role name.
All the rest of the code works. Let me know if this solves your problems.
J. Aaron Farr SONY ELECTRONICS DDP-CIM (724) 696-7653
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]