avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farr, Aaron" <Aaron.F...@am.sony.com>
Subject [merlin] properties in contexts, kernels, and configuration
Date Wed, 04 Feb 2004 21:48:16 GMT
Hello.

I've been meaning to add something to the exalibur-configuration package
which would allow context variables in configuration files, something like:

<configuration>
   <results-log file="${urn:avalon:home}/results.log"/>
</configuration>

Which would be resolved by the container before being passed to the
component in the configure() method.  This makes life easier when dealing
with things like working directories and whatnot.  It also means your
components can get away with not having to get such values in the
contextualize() method, thus cleaning up your code.

I was also thinking something like that might be nice for the merlin
kernel.xml file:

<kernel>

   <logging target="kernel" priority="INFO" name="kernel">
      <category name="/logger" priority="WARN"/>
      <target name="kernel">
        <file location="${merlin.home}/logs/merlin.log" />
      </target>
   </logging>

   <repository>
     <hosts>
       <host>http://www.ibiblio.org/merlin/</host>
       <host>http://www.ibiblio.org/maven/</host>
     </hosts>
   </repository>

</kernel>


But then I realizes that the merlin.properties values are not necessarily in
the Avalon context which got me thinking:

- Who/What has access to the merlin.properties values?

- Are they in the Avalon context?  Is there any reason not to have them in
the context?  They seem like valid context values to me.

- what's the relationship between these properties and the standard merlin
context values:

urn:avalon:partition     String            partition name
urn:avalon:name          String            component/scenerio name
urn:avalon:home          File (directory)  persistent directory
urn:avalon:work          File (directory)  temproty directory
urn:avalon:classloader   ClassLoader       component classloader

I don't mean to start up a huge debate about the context contract, but I
think adding support for merlin properties in kernel.xml makes sense and
they seem like perfect candidates for context values.

Thoughts?

J. Aaron Farr
  SONY ELECTRONICS
  DDP-CIM
  (724) 696-7653



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message