You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@james.apache.org by Howie Rosenblatt <ho...@oneviewcommerce.com> on 2013/03/25 15:07:40 UTC

James Database Tables

Hi,

I am trying to access the DB tables in James for reporting purposes.  I am
using James Server 3 beta 4, and HSQLDB.  I see the tables being referenced
in wrapper.log, but I do not have visibility to the tables when I access
the DB.

What is the best practice for getting to James mail data?  Can I access the
James tables, or write a Mailet to populate my own reporting tables?

Thanks!
Howie
*howie@oneviewcommerce.com*

Re: James Database Tables

Posted by Eric Charles <er...@apache.org>.
Hi,
If you only read the database, and if your HSQLDB is configured in a 
mode that accepts more than one jdbc client, you can certainly query the 
tables. They look like [1] (not sure if this corresponds to beta4 tables).

Otherwise, from a mailet, you can inject in your mailet the JPA 
PersistenceContext and make some JPA queries.

Thx, Eric

[1] http://james.apache.org/server/3/dev-database-schema.html

On 25/03/2013 14:07, Howie Rosenblatt wrote:
> Hi,
>
> I am trying to access the DB tables in James for reporting purposes.  I am
> using James Server 3 beta 4, and HSQLDB.  I see the tables being referenced
> in wrapper.log, but I do not have visibility to the tables when I access
> the DB.
>
> What is the best practice for getting to James mail data?  Can I access the
> James tables, or write a Mailet to populate my own reporting tables?
>
> Thanks!
> Howie
> *howie@oneviewcommerce.com*
>