Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Correct use of PropUtil

Discussion topic

Back to topic list

Correct use of PropUtil


Author goetz
Full name Brian Goetz
Date 2000-10-13 16:46:27 PDT
Message In the changes made to EyebrowseDb, MS made multiple changes of the form:
private static final String
dbName = PropUtil.getProperty​("eyebrowse", "dbName",
- "com.quiotix.eyebrowse",
+ null,

Instead of replacing the appPrefix with null, it should be replaced with
the actual eyebrowse package name, org.tigris.eyebrowse.

Having an application prefix causes PropUtil to look not only in the
properties file for "dbName" (in this case), but also for
in both the properties file and in the System properties. This allows you
to specify application-specific properties through a global properties
mechanism (as some app servers have) and through the command line by using
   java -Dorg.tigris.eyebrow​se.dbName="foo"

The System property, if specified, overrides anything specified in the
properties file. Specifying no application prefix invites namespace
collisions in the system properties.

Brian Goetz
Quiotix Corporation
brian at quiotix dot com Tel: 650-843-1300 Fax: 650-324-8032


« Previous message in topic | 1 of 1 | Next message in topic »


Show all messages in topic

Correct use of PropUtil goetz Brian Goetz 2000-10-13 16:46:27 PDT
Messages per page: