[Parc-users] recent changes
Brought to you by:
pmckinstry
|
From: Pete M. <pet...@ya...> - 2003-08-23 07:27:34
|
Vaibhav has added some support for nested property
files. This is especially useful when using multiple
datasources within a single parc application.
Take a look @ CompositeProperties.java along w/ it's
unit test to see how this works. Thanks Vaibhav!
On another note, to support multiple data sources,
some changes were required to the DataSourceFactory,
and the DBUtil class. The DataSourceFactory used to
take a Properties object that contained the
configuration data for a certain data source. It has
now changed to pass a data source name which keys to a
set of values in the configuration repositories. It is
nicer to use, but has a drawback. It breaks backward
compatibility w/ existing code. You now have to either
use DBUtil.getDataSource(), which retrieves the
default data source or DBUtil.getDataSource(String
name) which retrieves the named datasource. The
DataSource objects are also now loaded @ startup
instead of lazily upon first request.
For users who got a DataSource by calling
DBUtil.getDataSource(), the required changes are
minimal. Basically you have to change your
configuration repository (properties file, database,
whatever) to prefix the datasource properties w/
DataSource.default.
For an example of the change, take a look @ the
DataSourceFactoryTest.properties.
If users have been calling the DataSourceFactory
directly & not going through the DBUtil.java class,
the changes are more significant. They will need to
change the calls to pass a String ("default" for the
above example) instead of the actual properties
object.
Anyway, I think the changes are a positive move, but I
wanted to get other peoples feedback on how painful
this change would be. Should we spend more time & find
a better compromise or is changing the property
prefixes minor enough that people are fine w/ it?
Comments?
-pgm
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
|