You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Oki DZ <ok...@pindad.com> on 2001/08/02 08:56:48 UTC

Re: Input for JDB Mail Repository

On Tue, 31 Jul 2001, Charles Benett wrote:
> At the moment, they new classes need to be re-compiled for different
> drivers and dbs.

Recompiling the source to get the class working (for different dbs) is not
the right way, I believe. 

> I want to tidy up the config and move them into the main tree. 
> So I am looking for input from developers/ users.

What about defining the driver's name in config.xml? It would be nicer and
more flexible. The SQL statements are already outside ("softwired"?) the
source, that's nice. 
 
> 1) At the moment the JDBCMailRepository (like the town repository) puts
> all messages in one db table.
> a) Would it be useful to allows different tables, e.g. one for spam
> another for errors etc.?

It might be. 
If you have the table names, column names, and driver names in the config
file, then having different repositories in different tables needs no
rewriting the class. It would be about having the right entries (elements)
in the config.xml and some table creation in the databases. I think the
point is about the ease in the configuration. If it's not that difficult,
having one, two, three or more tables would be all right. Ones may have
reasons for have them more than one. eg: if the spam repository were in
its own table, then removing the spam message would just: "delete from
<spam-table>;" (ie: no need to have "where" this and that).

> b) If one had multiple tables, how likely is it that one would have them
> in different dbs or on different machines?

Admin skills show-off...?

> c) If one had multiple tables, would we still want all POP3 inboxes to
> be in one table or would per-user tables make sense?

One table per user for POP mailboxes is a bit too much, I believe.
 
> Any other suggestions re storing mail in a db would be welcome.

I already have one about configuration on one of my other postings.

This one regarding James.java; it needs to be tidied up, IMO, especially
on (the loading of) IMAP storage. I haven't had a chance to look into the
IMAP source, but I see that the loading is not as simple as
compMgr.lookup(); MailStore and UsersStore be done just like that (well,
they load the appropriate repositories). What makes the difference between
AvalonMailRepository and IMAP storage? Both are for storing the messages
right? If IMAP storage is supposed to have different interface than
MailRepository, then having an IMAPStore class would be nice (which would 
then it loads IMAPRepository). 

Well, I don't know the exact inner workings of the IMAP server as a whole,
so I might suggesting something irrelevant; but all I know is that the
IMAP things work with a different "tone" (design pattern?) compared to the
MailStore and UsersStore. And that's a bit confusing.

BTW, the names... yes the names... how would one guess that SimpleSystem
is related to IMAP? You already have some classes with NNTP...

Oki






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


Re: Input for JDB Mail Repository

Posted by Charles Benett <ch...@benett1.demon.co.uk>.
Oki DZ wrote:
> 
> On Tue, 31 Jul 2001, Charles Benett wrote:
> 
> > Any other suggestions re storing mail in a db would be welcome.
> 
> I already have one about configuration on one of my other postings.
> 
> This one regarding James.java; it needs to be tidied up, IMO, especially
> on (the loading of) IMAP storage. I haven't had a chance to look into the
> IMAP source, but I see that the loading is not as simple as
> compMgr.lookup(); MailStore and UsersStore be done just like that (well,
> they load the appropriate repositories). What makes the difference between
> AvalonMailRepository and IMAP storage? Both are for storing the messages
> right? If IMAP storage is supposed to have different interface than
> MailRepository, then having an IMAPStore class would be nice (which would
> then it loads IMAPRepository).
> 
> Well, I don't know the exact inner workings of the IMAP server as a whole,
> so I might suggesting something irrelevant; but all I know is that the
> IMAP things work with a different "tone" (design pattern?) compared to the
> MailStore and UsersStore. And that's a bit confusing.
> 
> BTW, the names... yes the names... how would one guess that SimpleSystem
> is related to IMAP? You already have some classes with NNTP...

The IMAP code pre-dates the NNTP code and the MailStore/ UserStore
stuff, which is why it doesn't fit.

What I think we need is for the MailStore class to serve up POP3
MailRepositories, SpoolRepositories or (IMAP) mailboxes as required.

When I started the IMAP stuff I thought to include IMAP mailbox
referrals but now I think I would forget that until we get a working
IMAP system.

And, currently, I don't have much time to do anything :-)

Charles

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