Hi all!
I am trying to migrate from an ECM-based container to Fortress/DefaultContainer,
primarily so I can use the life-cycle extention capability. I am a bit confused about
the config. formats, particularly with selectors. The real question is at the bottom,
with a pertinment example here:
For example, originally in roles.xconf, we had:
<roles>
<role
name="org.whatever.services.things.thingSelector" <-- with "Selector"
added to the ROLE name
shorthand="things"
default-class="org.apache.excalibur.component.DefaultComponentSelector">
<hint shorthand="thing1", class="org.whatever.things.thing1">
<hint shorthand="thing2", class="org.whatever.things.thing1">
<hint shorthand="thing3", class="org.whatever.things.thing1">
</role>
,,,,,,
</roles>
and in system.xconf, we had:
<app>
<things>
<thing1 name="mything1">
.....
</thing1>
<thing2 name="mything2">
....
</thing2>
</things>
.....
</app>
With Fortress/DefaultContainer, I am thinking system.xconf stays the same and
roles.xconf should become:
<roles>
<role name="org.whatever.services.things.thing">
<component
shorthand="thing1"
class="org.whatever.things.thing1"
handler="org.apache.excalibur.fortress.handler.ThreadSafeComponentHandler"/>
<component
shorthand="thing2"
class="org.whatever.things.thing2"
handler="org.apache.excalibur.fortress.handler.ThreadSafeComponentHandler"/>
<component
shorthand="thing3"
class="org.whatever.things.thing3"
handler="org.apache.excalibur.fortress.handler.ThreadSafeComponentHandler"/>
</role>
</roles>
So my question is, how/where do I specify the selector and where do I specify its
shorthand (i.e. the "things" so I can use the "<things>...</things>" elements)?
Maybe, I should be using "id" as the component-shorthand, and "shorthand" as the
selector-shorthand? The old convention was, if you asked for 'ROLE + "Selector"' you'd
get the Selector, but asking for "ROLE" would get the component. How is this
accomplished now?
One other question, a couple of the examples show .xinfo files. Is the use/format of
that file documented somewhere?
TIA,
Shash
PS: In the future I'd like to migrate to the MetaDataContainer, one step at a time
:-). Are there any examples/info about the Conatiner and its configuration format?