Leo Sutic wrote:
> <type> > <context type="BasicContextInterface"> > <entry key="location"/> > <entry key="home" type="java.io.File"/> > </context> > </type> > <component name="basic" > class="org.apache.excalibur.playground.BasicComponent"> > <context class="org.apache.excalibur.playground.BasicContext"> > <entry key="location">My Place</entry> > <import name="avalon:home" key="home"/> > </context> > </component> Stephen, regarding the location entry above: Given that the context is supposed to be container-supplied values, what is the point of allowing the user to create own context key/values? Debugging? Portability (forcing a component to run in a container that doesn't supply the required context value)?
Portability.
The context entries with the <component ... ><context> element are only needed to resolve non-standard context classes and entries. It simply a mechinism that allows component authors to provide the convinience interface on a derived context object, and a comon way to import and manipulate standard context entries to create custom types. For example, using the above declaration an assembler (person) can add information to allow the creation of a context object implementing the Phonix BlockContext and handle mapping of standard context keys to Phoenix specific keys. You can use the same approach to construct a servlet context or any other application specific context solution.
Cheers, Steve.
/LS
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- Stephen J. McConnell OSM SARL digital products for a global economy mailto:[EMAIL PROTECTED] http://www.osm.net -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
