db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject Clean configuration (fwd)
Date Sat, 02 Jul 2005 14:54:47 GMT

I'd like to clean up the runtime configuration process a bit.
To do that, I would like to remove some unused properties in
src/conf/master/Torque.master. This file is used to create e.g. the 
configuration for the runtime tests.
The unused properties are
- torque.applicationRoot
- the whole log4j stuff. It seems that log4j is not initialized in any
way by the runtime, the user has to configure the logging.

Also, the usual configuration file has all properties prefixed by
"torque.". But it is possible to create a valid configuration file if
no property is prefixed by "torque." The drawback is, that if one property
starting with "torque." is set, all the other properties are ignored,
which is not a behaviour which is expected. I would like to change the
behaviour such that the prefix "torque." is required, and all properties
not starting with "torque." are ignored.

Then, I would like to throw more exceptions in the initialisation
process. For example, if a user does not provide any
torque.database keys (e.g. torque.database.<somedb>.adapter), a warning is
written into the logfile, but nothing else happens. Experience from teh
user list shows that people tend not to look in the logfiles. Also, I
cannot imagine that Torque can be used without specifying an adapter. So
I'd like to change the log level from warn to error and throw an
exception. The affected places which I would like to make required are

- torque.database.default
- torque.database.<defaultDatabaseName>.adapter
- torque.dsfactory.<defaultDatabaseName>.factory

If Torque is not yet initialized, Torque.getDefaultDB() returns the String
"default". This is a strange behaviour, because it is different before and
after initialisation, and it is not clear that the String "default" is not
the real value of the parameter. I would like to return null if Torque
is not initialized and Torque.getDefaultDB() is called.

There was a DatasourceFactory defined under the key "default", which
duplicated the DataSourceFacory under the Key with the default database.
Torque does not need this, and I think it is unintuitive behaviour. I
would like to remove this mapping.

Any objections, comments, ideas for improvements ?


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message