John McNally wrote:
> This requires the service to have information regarding the servlet context.
> It is simple to do and has been requested before, I believe, with regard to
> not having to specify an absolute path in WebMacro.properties as
> well. A Service.init(Object) or more specific Service.init(ServletConfig)
> can solve this. I propose that there continue to be a no arg init() as
> well. Service will have one more method as well, requiresServlet().
>
> TurbineServices.getService(String) then calls requiresServlet() to determine
> whether to init with init() or init(Object). Turbine supplies its
> ServletConfig to TurbineServices when it loads. If a service is called
> which requires the servlet prior to the servlet initialization,
> TurbineServices will throw an Exception.
>
> This is reasonably clean, but some may object to having two init methods, so
> we could just have one which takes an object.
>
> Some may object to this since many services so not require the object.
>
> Then we would need to define a separate Service interface for services which
> depend on a servlet/servletengine environment.
>
> How do you wish me to proceed?
Ugh. I have already done all that you are talking here about. Please download
http://suokong.e-point.pl/turbine/download/InitAPI_WebMacro.diff.gz
and try it before you proceed. I'd appreciate your feedback!
Rafal
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]