> 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:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 5:16 PM
> To: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]