You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Atul Dambalkar <ad...@cisco.com> on 2001/07/11 02:15:57 UTC

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


RE: Initializing a Turbine Service

Posted by Atul Dambalkar <ad...@cisco.com>.
At 09:29 AM 7/11/01 -0700, you wrote:
> > 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();

Thanks, David. I will try this.

-Atul

>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


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


RE: Initializing a Turbine Service

Posted by David Sean Taylor <da...@bluesunrise.com>.
> 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