james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell DeBoer <li...@bigdaz.com>
Subject [PATCH] Added avalon JDBC connection management to UsersJdbcRepository
Date Sun, 05 Aug 2001 08:56:30 GMT

I've (finally) managed to get the UsersJdbcRepository implementation working 
using the cornerstone DataSourceSelector block and the Excalibur 
JdbcDataSource component. This means that the Jdbc connections are now pooled 
and reused, and the database configuration is moved to a single location in 
the config file.

However, these changes are dependent on the latest CVS version of 
"avalon-excalibur.jar", which has some bug fixes for driver class loading. It 
also means that jdbc driver jar files now should be added to the phoenix libs 
directory directly, not bundled in the James.sar file. (This is simpler, 

In addition, I've cleaned up the UsersJdbcRepository a little - made the 
table name configurable (so we can now use it for the listserv mailet), and 
cleaned up some long lines to fit in 80 columns.

The main config changes:
- Added DataSourceSelector as a dependency in AvalonUsersStore.xinfo
- Modified james-assembly.xml to include the DefaultDataSourceSelector block, 
and provide it to the AvalonUsersStore. The block is named 
- Added "database-connections" section to james-config.xml, with a sample 
connection to a MySQL database.
- Modified the "users-store" config section to use the new JdbcUsersRepository
- Fixed listserv config in proposals dir

The patch applies these changes to config files in both proposals and main 
branch. Both seem to work ok.

Hopefully, we can get the JdbcMailRepository using the same 
DataSourceSelector block, which will simplify initial setup.

I was thinking of doing some work to the UsersStore block, so that Users 
repositories can be selected using a similar path syntax to that used by Mail 
repositories. Eg. "db://<data-source>/<table-name", or something similar. Any 

View raw message