james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell DeBoer <li...@bigdaz.com>
Subject Working on UsersJDBCRepository.
Date Thu, 07 Jun 2001 15:04:28 GMT
Hi all,

I've just started playing around with the James source, and was hoping to 
help out. Looking at the TODO, I saw that a direct JDBC repository for Users 
and Mail was a high priority, and decided to try tackling that (User 
repository first).

However, I've noticed that there's a bit of activity in CVS around the 
userrepository, and I don't want to waste my time on something that is 
already being completed. I noticed a reference to a "UsersJDBCRepository" in 
the james-config file, but it's not in CVS. Has this been implemented? 
Otherwise, that's where I'm planning to start.

Basically, my plans are:
1) Create 
	AbstractUsersRepository implements UsersRepository
with all methods implemented on top of a few core protected methods 
(eg
	addUser(JamesUser user), 
	removeUser(JamesUser user),
	updateUser(JamesUser user),
	Iterator listAllUsers() { returns an Iterator of JamesUser instances };
)
This will make it very easy to implement a new UserRepository, and overriding 
other methods could make it faster, if looping through all the users to find 
one proves to be too slow.

2) Create:
	UsersJDBCRepository extends AbstractUsersRepository 
which executes CallableStatements on the database connection for all database 
access. This keeps the SQL generation and database peculiarities out of the 
code. 

3) For now, just update the sql scripts which create the tables to also 
create Stored Procs on the database. I've got access to Postgresql and Oracle 
installs, so I'll do up scripts for those as well.

4) I haven't looked at the Mail repository yet, but I assume a similar JDBC 
implementation could be used there.

5) Longer term, we could have the tables and procedures created automatically 
as part of installation, but this is probably low priority.

Your comments would be appreciated. If I'm stepping on someones toes here let 
me know, and I'll look through the code for something else that I think I can 
do...

ciao
Daz

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


Mime
View raw message