Hi Jon

I just look at the source for TurbineConfig and there's three things that I
want to know.  First, your example have a line tc.init().  As it's already
in the constructor for TurbineConfig, why would we call it explicitely?

My second question is about the fact that you said that we can use
TurbineResources outside of Turbine.  It's seems true but what is the cost
of doing so?  I saw in the init that a Turbine object is created and
initialize.  Are the two services mentionned (ResourceService and
LoggingService) the only ones that will run?  Can I set a property so that
the Logging don't run at all?

The last thing is still about TurbineConfig.  The first parameter is the
base directory from where the properties file can be found.  Is there any
default that I missed (like looking in the classpath)?  If not, as an
application can be installed about anywhere on a filesystem and we certainly
don't want to put a path in the code, how do you suggest that we configure
this base path?  Via the servlet config?

Thanks.


Etienne

----- Original Message -----
From: "Jon Stevens" <[EMAIL PROTECTED]>
To: "Turbine" <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 5:00 PM
Subject: Re: Custom properties file


> on 2/5/01 1:26 PM, "William Lee" <[EMAIL PROTECTED]> wrote:
>
> > I would like to have a separate properties file than the default Turbine
> > one.  What is the most correct way to do this using the TurbineResources
> > class?
> >
> > Thanks,
> >
> > Will
>
> Raphael answered the question well. You can also use TurbineResources on
> your own (even outside of general Turbine) by simply doing something like
> this:
>
> TurbineConfig tc = new TurbineConfig("/basepath", "My.properties");
> tc.init();
>
> Then, you can call from anywhere in your code:
>
> String propvalue = TurbineResources.getString("yourproperty");
>
> Note that that will start up two base services, the ResourceService and
the
> LoggingService with their default values which may or may not be
preferable
> to you.
>
> thanks,
>
> -jon
>
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to