cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Coboos <>
Subject Re: component lifecycles
Date Mon, 28 Jun 2004 13:52:01 GMT
Jeremy Quinn wrote:

> How would I organise this differently, in the situation where I had 
> several of these Components, each differently configured, that I 
> wanted to be able to load in FlowScript in a similar way. Maybe we 
> want one setup for read-only privs and another setup for read-write 
> privs etc.

Use the ServiceSelector like for DataSources. I dont't know where 
documentation about this can be found, but the sources of Cocoon should 
contain many lines of that kind and a search on "ServiceSelector" should 

Using a ServiceSelector, a entry in cocoon.xconf looks like:

   <component-instance class="bar.Foo" name="foo1">
      <parameter ...../>
   <component-instance class="bar.Foo" name="foo2">
      <parameter .../>

In a java class the code to retrieve the component foo1 should be 
something like:

ServiceSelector selector = 
Foo foo1 = (Foo)"foo1");

Hope this few lines helps.


View raw message