I am looking at code that Stephen worked over from Fulcrum. In the past we
always had on the API a ROLE. So, like this:
/** Avalon role - used to id the component within the manager */
String ROLE = Config.class.getName();
Is ROLE purely there for use in ECM/Fortress containers? Because in the
Merlin testcase, instead of a lookup using ROLE, we use:
config = (Config) this.resolve( "conf" );
Because we defined this:
<component name="conf"
class="org.apache.fulcrum.configuration.DefaultConfigurationService"/>
We could have resolved it as FooBAR if we did this:
<component name="FooBAR"
class="org.apache.fulcrum.configuration.DefaultConfigurationService"/>
So, should we just leave ROLE on for old users? This code really hasn't
been 1.0 released yet, so I would rather ditch anything old. After all you
can look up in your code by anything, not just ROLE in ECM..
My other question is that in the block.xml we have:
<services>
<service type="org.apache.fulcrum.configuration.Config">
<source>config</source>
</service>
</services>
Now, the only reason to have that is to declare that we export this
"service" so that others can use it without writing their own block.xml,
correct? So, as long as you lookup 'config/conf' you get back the right
object. So I can, in my code do either of these calls:
config = (Config) this.resolve( "conf" );
or
config = (Config) this.resolve( "config/conf" );
I just don't quite understand why I could do "conf" versus "config/conf", is
it because my default container was already called "config"?
Eric Pugh
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]