avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: [ISSUE] containerkit
Date Tue, 02 Jul 2002 08:10:28 GMT


> From: Stephen McConnell [mailto:mcconnell@osm.net] 
>
> One of two things needs to happen:
> 
> (a) either the context related constraint information is removed from 
> ComponetInfo
> 
> (i.e. we treat context the same way we treat configuration 
> and parameters - we guarantee an instance of Context and 
> nothing more - and document the implication of moving outside 
> of this constract)
> 
> or, (b) context information is included in ComponentMetaData

Stephen,

context information - that is, the context entries that the component
requires should be made part of the .xinfo file and thus (b) in your
list above.

Reasons:

 1. The contract for Context specifies that it is an exceptional event
    if a context entry isn't present and the component is then
considered 
    broken.

 2. You have to document it *somewhere*. Somehow, you must be able to
take
    a component xinfo and see exactly what it requires to run.

Number 2 is, in my opinion the most important one.

But I do not ever think you can make a context validatable. That is,
even
if you do include context information in the .xinfo, the container will
have
no clue about what to do with it.

You can constrain the context entry to the type:

  <context-entry key="arbetskatalog" type="java.io.File"/>

But how do you tell the container that the file is supposed to point at
a 
context directory?

The only solution I see is to provide a standard set of context keys
across all containers, with the context declaration in the .xinfo being
a minimal list saying "this is what you can get away with if you want to

run me." Otherwise, what will the container do when it sees a context
key that it doesn't know - sprout new code?

Or will you have pluggable context entry factories that interface with
the container via a standard container interface:

  <context-entry key="context-root" 
                 type="java.io.File" 
                 provider="org.apache.avalon.ContextRootProvider"/>

With the org.apache.avalon.ContextRootProvider somehow figuring out
what the context dir is.

/LS


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


Mime
View raw message