on 1/19/00 2:06 PM, Frank Kim <[EMAIL PROTECTED]> wrote:

> I've got a case where I want a FooResources singleton that is just like
> TurbineResources to store application specific stuff.  The nice thing with
> TurbineResources is that we can set the props file in init() but there's not
> a nice place to store the FooResources props file without hard coding the
> path to it (tell me if I'm wrong here).

You *could* put it into the servlet engine initArgs like we already do with
TurbineResources.properties loading.
 
> So what I'd like to do in FooResources is this:
> 
> confs = new Configurations(
> new ExtendedProperties(
> 
> RelayResources.class.getResourceAsStream( "/foo.properties" )
> )
> );

I would make it RelayResources.getClass().getResourceAsStream().

You could also put a property into the TurbineResources.properties file that
specifies the location of the "extra" properties file. This would probably
be my preferred method.

> 
> But this requires adding this constructor to ExtendedProperties:
> 
> /**
> * Creates and loads the extended properties from the specified
> InputStream.
> */
> public ExtendedProperties (InputStream input) throws IOException {
> this.load(input);
> }
> 
> Would need to synch this with org.apache.java.util

I would rather not touch the EP class right now because we just did a
release of Apache JServ and I don't want to require people to download the
CVS of it.

-jon

-- 
Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>




------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to