You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br> on 2003/09/02 16:36:19 UTC

Re: Using Avalon components

On Sun, 2003-08-31 at 09:23, David Wynter wrote:
> Hi,
> 
> When you want to use a Avalon component within a Action class when should
> you retrieve the TurbineAvalonComponentService?. Is it recommended to s do
> this for every method that uses the component? Or is it better to have a
> static in your Action class that stores the reference to it? If lots of your
> action classes use it, then what is the recommended approach to accessing
> the components? As far as I see it there is the retrieval of the Avalon
> Component Service and then there is the following retrieval of the actual
> Component itself.
> 
>             TurbineAvalonComponentService tacs =
> (TurbineAvalonComponentService) TurbineServices.getInstance()
> 
> .getService("AvalonComponentService");
> 
>             DefaultScheduler scheduler = (DefaultScheduler) tacs.lookup(
>                     					"org.codehaus.plexus.scheduler.Scheduler");
> 
> 
> Any recommendations on this?

Dunno. I changed Turbine to handle modules as components with a limited
lifecycle interface. Example :

public void init();

public void preDoPerform();

public void postDoPerform();




then, on init(), I get a handle to all avalon components that I use on a
particular module (action or screen).

OBS: I'm using TURBINE_2_2_0

> 
> Thanks
> 
> David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> 
-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://db.apache.org/ojb
http://xingu.sourceforge.net