> -----Original Message----- > From: Mark Gulbrandsen [mailto:[EMAIL PROTECTED] > Sent: 06 July 2005 19:08 > To: server-user@james.apache.org > Subject: Custom Mailet or Repository > > Hi all, > > I want to store emails in a database. But, I want to index the inbox > emails in a different way than the regular inbox table. For example > (MySQL): > > create table webmail_inbox ( > id bigint not null auto_increment, > client_id bigint, > subject varchar(10000), > sender varchar(255) not null, > received_date datetime not null, > message longtext, > primary key (id) > ) type=InnoDB > > Should I create a custom JDBC Repository implementation or simply a > custom Mailet? > > One reason why I have the subject, sender, and received_date fields is > to improve inbox rendering performance. So, the custom JDBC Repository > or the custom Mailet would populate these fields for me. Then, when I > render the message, I'll use the javamail APIs. > > I'd like to be able to do this with a Mailet. Creating a JDBC > Repository seems like much more work.
Yes it is a lot of work. IMHO unless you are making changes that the James user base has a whole could use I'd not bother with the JDBC Repository and use a mailet instead. The only reasons to use a JDBC Repository are if you want that to act as a spool as well as a mail store or if you want to use multiple DB platforms. Then a mailet would not be as useful as you'd have to duplicate a lot of code that already exists Hope this helps. > > Comments? > > Thanks, > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]