portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor" <da...@bluesunrise.com>
Subject RE: Initializing a Turbine Service
Date Wed, 11 Jul 2001 16:29:07 GMT
> Can anyone point me to a code snippet or show me how to
> programmatically
> initialize a service within an init method of some other service. The
> documentation for
> org.apache.turbine.service.TurbineBaseService talks about
> that, but I couldn't figure out proper way to do this.

I believe the order that the services are declared in the TRP is the order
in which the services will be initialized.
This may work, haven't tried it:

YourService service =
YourService)TurbineServices.getInstance().getService( SERVICE_NAME );

>From there, just call your Service interface:

if (!service.getInit()) // get the init status
	service.init();

Try asking on the Turbine list for more details



> -----Original Message-----
> From: Atul Dambalkar [mailto:adambalk@cisco.com]
> Sent: Tuesday, July 10, 2001 5:16 PM
> To: jetspeed-dev@jakarta.apache.org
> Subject: Initializing a Turbine Service
>
>
> Hi,
>
> Can anyone point me to a code snippet or show me how to
> programmatically
> initialize a service within an init method of some other service. The
> documentation for
> org.apache.turbine.service.TurbineBaseService talks about
> that, but I couldn't figure out proper way to do this.
>
> Here is what the doc says:
> ============
> If you need to use another Service inside your early initialization,
> remember to request initialization of that Service before using it:
> getServiceBroker().initClass("OtherService",data);
> OtherService service =
> (OtherService)getServiceBroker().getService("OtherService");
> =============
>
> Thanks,
>
> -Atul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message