avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@osm.net>
Subject Re: Fortres: async/sync init
Date Fri, 19 Jul 2002 13:28:22 GMT


Marcus Crafter wrote:

>On Thu, Jul 18, 2002 at 02:04:32PM -0400, Berin Loritsch wrote:
>  
>
>>>From: Stephen McConnell [mailto:mcconnell@osm.net] 
>>>
>>>Berin Loritsch wrote:
>>>
>>>      
>>>
>>>>>From: Marcus Crafter [mailto:crafterm@fztig938.bank.dresdner.net]
>>>>>          
>>>>>
>>>>>	Ok. Where should we specify such a line ? in the roles
>>>>>file on the
>>>>>	root element ? per component along with the handler definition ?
>>>>>	or in the xconf file with the handler definition ?
>>>>>	
>>>>>	Thoughts ?
>>>>>          
>>>>>
>>>>Per the container.
>>>>
>>>>        
>>>>
>>>Disagree.
>>>It is totally reasonable to declar thias at the component 
>>>profile level. Why should this be generalized to the 
>>>container level? Steve.
>>>      
>>>
>>How would you handle this sort of thing in Merlin?  It is something
>>that you would find in the component descriptor, or in the
>>configuration.
>>Right now, we have it set up so that the decision for async
>>initialization
>>is done per component.  However, it is easy enough to change to per
>>component.  I would still advocate the attribute to be applied to the
>>container as a default if no init policy is selected on the
>>per-component
>>level.
>>    
>>
>
>	This would be good. Have a 'default' initialization policy at the
>	container level, which is used if component level policy
>	declarations are not specified. 
>
>	ie. something like:
>
>app.xconf:
>
><app default-init-policy="startup">
>
>	// component configuration
>	
></app>
>
>app.roles:
>
><role name="org.apache.excalibur.fortress.examples.components.Translator">
>  <component shorthand="translator"
>             class="org.apache.excalibur.fortress.examples.components.TranslatorImpl"
>             handler="org.apache.excalibur.fortress.handler.ThreadSafeComponentHandler"/>
>	     init-policy="lazy"
></role>
>
>	where init-policy can be:
>	
>	first-use/lazy - indicating component handler initialization done on
>	       first access (ie. lazy).
>	startup - indicating component handler init is done during container
>	       startup.
>	       
>	How does that sound ? any better names ?
>

Here is a naming suggestion:
The policy concerns service/component -activation- i.e. should 
activation occur -on- *startup* or should activation be deferred such 
that it is activated -on- the first *request*.  

   <your-root-container-element>

       <!--
       Declare the default activation policy.
       -->
       <activation on="startup"/>

       <!-
       Normal stuff here.
       -->

  </your-root-container-element>

Where the "on" value shall be either of the following keywords - 
"startup" or "request".
As far as the component declaration is concerned, I would prefer to see 
this like:

    <component name="... " class="..." on="request"/>

Cheers, Steve.

>
>	Cheers,
>	
>	Marcus
>
>  
>

-- 

Stephen J. McConnell

OSM SARL
digital products for a global economy
mailto:mcconnell@osm.net
http://www.osm.net




--
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