cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@mad.scientist.com
Subject Re: Avalon explainations
Date Thu, 10 Aug 2000 10:57:39 GMT
> > Unfortunately at this current moment the Avalon list is
> > going through it. There are some parties who would remove
> > the Configuration interface completely and do everything
> > through JNDI.
> >
> 
> ????????????
> What's the advantage of using JNDI ???
> They don't want to use config files anymore ? And what about portability ?

The theory is to load everything through JNDI because that
is a standard. So you would still use config files - jou
could just not use certain patterns like having multiple
elements with same tag name under another tag - ala

<x>
  <y/>
  <y/>
</x>

There are heaps of other penalties for using the standard
aswell and it kills Avalons Inversion of Control idea. There
is a posibility that you will still be able to get
configurations as they are now. Thou instead of implementing
Configurable you will instead have to do something like

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, 
  "org.apache.avalon.engine.BlockFactory");
env.put(Context.PROVIDER_URL, "avalon://localhost/cocoon");
env.put(AvalonContext.SRC_COMPONENT, this);
Context context = new InitialContext( env );
Configuration conf = (Configuration)context.lookup("comp/env");

and then proceed as you do now.

Needless to say I ain't thrilled with that way or also other
restrictions (like you can't do this from non-primordial
classloader due to bug in JNDI).

> > I am trying to stop that but unfortunately I am lone in my
> > venture so it looks like all Configuration and
> > ComponentManager could be dropped soon.
> 
> I really don't understand why....

nor I.

Cheers,

Pete

*--------------------------------------------------*
| Latrobe University,     |                        |
| Bundoora, Australia     | Does the name 'Pavlov' |
| Office: PW220           |    ring a bell ?       |
| Ex: 2503                |                        |
*--------------------------------------------------*


Mime
View raw message