"Daniel L. Rall" wrote:
>
> "Diethelm Guallar, Gonzalo" <[EMAIL PROTECTED]> writes:
>
> > Not really. As I see it, moving the logging facility to a
> > service would have one drawback: it would not be possible
> > to use it from a stand-alone app that wants to use Turbine
> > as a class library, not a servlet (like torque does or will
> > do). Would this be a problem? I guess the logging facility
> > could be moved to a service and still present an interface
> > usable for these cases...
>
> There is no problem using Turbine services in a stand alone
> application (i.e. library fashion). There is one simple step of
> calling the properties/services initializer yourself.
Yes, and no... It's easy to intialize resource service, but initalizing
the other services takes calling
TurbineServices.initServices(ServletConfig)
to get the getRealPath-dependent methods to work. I needed that for a
command line application that used WebMacroService (among others) so I
had
to come up with a fake ServletConfig class that implemented getRealPath
replacement that had a list of paths to search. Not very clean, but it
works for me.
Rafal
--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]