commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Neibarger <scott.neibar...@gmail.com>
Subject Re: [daemon] DaemonConfiguration question
Date Wed, 14 Mar 2012 10:52:55 GMT
That resolved my problem. Thank you!

On Mon, Mar 12, 2012 at 12:45 PM, sebb <sebbaz@gmail.com> wrote:

> On 12 March 2012 11:34, Scott Neibarger <scott.neibarger@gmail.com> wrote:
> > It returns a boolean and I am checking if it's false. I didn't build the
> > source, but I downloaded it to verify I was setting my properties file up
> > correctly. When DaemonConfiguration.getProperty() calls
> > Properties.getProperty(), it passes PREFIX as part of the key
> ("daemon."),
> > so I tried prefixing my calls to DaemonConfiguration.getProperty() with
> the
> > same prefix and got the same result.
>
> AIUI the class is only intended to support properties which are
> prefixed with the string "daemon.".
>
> So your property file needs to look like:
>
> daemon.abcd=123
>
> >
> > On Sun, Mar 11, 2012 at 10:55 PM, sebb <sebbaz@gmail.com> wrote:
> >
> >> On 12 March 2012 01:11, Scott Neibarger <scott.neibarger@gmail.com>
> wrote:
> >> > Hi,
> >> >
> >> > Perhaps I'm confused about extending Daemon, and using
> >> DaemonConfiguration,
> >> > but I hope not. I've created a DaemonConfiguration object and passed a
> >> file
> >> > to the load() method. It successfully loads without throwing any
> >> > exceptions,
> >>
> >> The load() method catches Exceptions - did you check the return code?
> >>
> >> >  but when I try to get any properties from the file, getProperty
> >> > returns null, and the getPropertyArray() method returns an empty
> array.
> >> >
> >> > I set up the properties file as such:
> >> >
> >> > home.dir=/path/to/home
> >> > etc.dir=${home.dir}/etc
> >> > bin.dir=${home.dir}/bin
> >> >
> >> > Should I be able to call getProperty("home.dir") and get
> /path/to/home ?
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: user-help@commons.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message