avalon-phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: thinking Merlin/Pheoix stuff ...
Date Wed, 05 Jun 2002 08:10:06 GMT

Cross-posting to avalon-dev as I believe that the Cocooners have notion of 
scope as they can have sitemaps "mounted" in other sitemaps which is similar. 
Thus they probably be able to explain their implementation.

On Wed, 5 Jun 2002 16:21, Stephen McConnell wrote:
> Peter Donald wrote:
> >On Wed, 5 Jun 2002 13:44, Stephen McConnell wrote:
> >>Peter Donald wrote:
> >>>On Wed, 5 Jun 2002 05:34, Stephen McConnell wrote:
> >>>> <dependencies>
> >>>>    <dependency>
> >>>>
> >>>>        <!-- declaration of a classic dependency -->
> >>>>
> >>>>        <role>orb</role>
> >>>>        <service name="org.apache.orb.ORB" version="2.4">
> >>>
> >>>I have been experimenting with something like
> >>>
> >>><constraint type="initializer" value="o.c.TimeServer"/>
> >>><constraint type="initializer" value="o.c.BlahServer"/>
> >>>
> >>>The constraints will be container specific but can do most of what I
> >>>wanted but so far the experients been less than successful.
> >>
> >>Two questions:
> >>1. What's the specific objective of the experiments?
> >
> >To see if it is possible to do one/any of the following
> >* declare constraints in some generic fashion. Generic enough that it can
> > do the following;
> >  - declare an ORB must contain components at end of startup
> >  - declare that a component must be scoped/nestable (constraint from
> > myrmidon dev for scopes such as workspace, project, target, task etc).
> > Basically means that the component must implement another "lifestyle"
> > interface with a single method.
> Can you provide some relevant links (i.e. more relevant then the root
> myrmidon) so I can get a better feel for the implication of scopes?

Unfortunately most of the information is located in Adams head (another active 
developer on myrmidon) so I am not sure I could explain it fully ;)

However the basic idea is as follows;

Each component lives in a "scope" or environment. For instance myrmidon has 
components such as 
* ConverterManager
* TypeManager
* Configurator
* Executor

Now for some of these components (TypeManager for instance) you can create 
Child objects. The TypeManager child allows you to register extra types. 
These types are visible to current TypeManager and all child TypeManagers 
(unless they get overidden).

So lets say we have scopes;

* workspace
* project
* target
* task
* sub-tasks

If you register a type at workspace level then it will be visible to all tasks 
in all projects. If you register type in one project (say via a taskdef) then 
it will only be accessible by that project and not any other projects in 

This phenomenon can be nested as far as you want to go (ie tasks can create 
their own scopes and execute child tasks inside them).

A naive implementation would have each service implement a createChildX method 
if needed. However what happens when the Configurator depends on TypeManager 
and a child TypeManager is created. This means a child Configurator has to be 
created or an exception has to be thrown (or warning issued or whatever).

Anyways - what about mounted Cocoon sitemaps - are they similar?


Peter Donald
"Wise men don't need advice. Fools don't take it." 
                        -Benjamin Franklin 

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

View raw message