Differences between revisions 2 and 3
Revision 2 as of 2005-03-22 05:40:20
Size: 1681
Editor: anonymous
Comment: missing edit-log entry for this revision
Revision 3 as of 2009-09-20 22:58:12
Size: 1681
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Mail Attributes: Upgrading JDBC Repositories

James v2.2a9 and later support the notion of attributes on mail. These are like X-headers, except that

  • they are internal to James,
  • can be objects,
  • are associated with org.apache.mailet.Mail, not javax.mail.Message,

  • do not require processing the associated message content.

James v2.2 has been written to be compatible with older versions, but in order to take advantage of attributes with JDBC repositories, several steps need to be taken.

These are preliminary instructions. Please remember to backup the database and test. Please let us know of any problems.


How to to upgrade db based repositories:

  1. Stop the server.
  2. Backup the database!

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

  4. Deploy the updated sqlResources.xml. The version in CVS enables attributes by default. Early versions had attributes support disabled by default; look for "attributes support" string in the sqlResources.xml, and comment/uncomment following the instructions.

  5. Block external access to the server.
  6. Restart the server.
  7. Test until satisfied (more detail to come).
  8. Allow external access to the server.

If you see a SQLException after deploying the new sqlResources.xml, it must likely means that you did not complete the table upgrade properly, and should review.

UpgradingToAttributes (last edited 2009-09-20 22:58:12 by localhost)