Serge,

I committed on August 18 a change to sqlResources.xml to become "mail attributes 
enabled" by default.

As I'm now using a very slow and expensive Internet connection (using my cell phone as 
a modem), I have to wait until beginning of September to write a comprehensive note in 
wiki about mail attributes and about how to upgrade db based repositories.

As suggested by you in September I'll write code to check if the system is valid for 
mail attributes: it's fairly easy. Just adding a new "public boolean 
columnExists(DatabaseMetaData dbMetaData, String tableName, String columnName)" method 
to JDBCUtil and calling it as appropriate in JDBCMailRepository.

In the meantime, here is a short note on how to to upgrade db based repositories:

<steps>

1) Stop the server.

2) Alter both the "inbox" and "spool" tables adding the "message_attributes" column 
(look in sqlResources.xml for the "message_attributes" definition in the <sql 
name="createTable" db="???"> entry appropriate for your DBMS). Nulls *must* be allowed 
for backward and forward compatibility.

3) Deploy the current sqlResources.xml updated from CVS (or look for "attributes 
support" string in the sqlResources.xml coming with James v2.2.0a9 Test Build and 
comment/uncomment following the instructions).

4) Restart the server.

</steps>

You can restart the server in between steps 2) and 3) as many times as you want.

THE ONLY THING TO AVOID IS exchanging steps 2) with 3) restarting the server in the 
middle: it would generate SQLException-s.

All this also means that, from now on, deploying the current CVS sqlResources.xml 
implies that either the "inbox" and "spool" tables are manually altered or being 
automatically created from scratch.

I hope that this is enough for the moment, otherwise let me know.

Vincenzo


> -----Original Message-----
> From: Serge Knystautas [mailto:[EMAIL PROTECTED]
> Sent: lunedi 18 agosto 2003 16.07
> To: James Developers List
> Subject: Re: Mail attributes and sqlResources.xml
> 
> 
> Vincenzo Gianferrari Pini wrote:
> > I suggest then to modify sqlResources.xml accordingly in CVS to 
> become "mail attributes enabled" by default. Some notes (in wiki? 
> in the faq?) should be written to help administrators enable 
> existing servers that have db based repositories (I can do that 
> when back home).
> 
> +1.  I look forward to the notes on how to upgrade my database structure 
> to support mail attributes. :)  There's a related bug in bugzilla about 
> how a bad table structure could crash JDBCMailRepository... maybe we 
> could use DatabaseMetaData to determine whether the system is valid, and 
> even make the error message that your database isn't configured for mail 
> attributes appear automagically.
> 
> 
> -- 
> Serge Knystautas
> President
> Lokitech >> software . strategy . design >> http://www.lokitech.com
> p. 301.656.5501
> e. [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to