Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: incorrect CVS commit

Discussion topic

Back to topic list

Re: incorrect CVS commit


Author goetz
Full name Brian Goetz
Date 2000-09-19 13:35:40 PDT
Message >Check out the first different line below; that seems incorrect,
>though we probably want to abstract that out to a config file
>somewhere; same goes for that database password.

Brian is right, of course. (I love hearing that, even if I'm not the Brian
being referenced.)

Eyebrowse does read these out of a config file -- look more carefully at
PropUtil.getProperty. The properties com.quiotix.eyebrowse.{dbName,
dbUser, dbPassword} can be specified in the eyebrowse.properties file or on
the java command line and can be abbreviated as {dbName, dbUser,
dbPassword} in the properties file. See the sample properties file for
more explanation.

   public static String getProperty(String application,
                                    String propName,
                                    String appPrefix,
                                    String defaultValue)

By way of documentation, what the PropUtil.getProperty call is doing is
reading from a configuration file, and only uses the provided defaultValue
when the configuration file cannot be found or the configuration item is
not found.

The default values in the code were deliberately specified as they were
(path jdbc:mysql://localho​st/eyebrowse, user eyebrowse, password eyebrowse)
to provide the "obvious" set of defaults, so if someone wants to experiment
with Eyebrowse, they can create a database called eyebrowse and a user
called eyebrowse and then not have to bother editing the config file. (The
installation documentation explains this, I think.)

This illustrates a valuable design principle for components like this one:
if at all possible, the application should run and do something reasonable

And, of course, its generally a bad idea to put passwords into code.

These changes should not have been committed.

(the other) Brian

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

Re: incorrect CVS commit goetz Brian Goetz 2000-09-19 13:35:40 PDT
Messages per page: