james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: JPA
Date Sat, 15 Nov 2008 13:54:13 GMT
On Fri, Nov 14, 2008 at 6:46 AM, David Jencks <david_jencks@yahoo.com> wrote:
>
> On Nov 13, 2008, at 10:21 PM, Robert Burrell Donkin wrote:
>
>> On Thu, Nov 13, 2008 at 1:01 PM, Robert Burrell Donkin
>> <robertburrelldonkin@gmail.com> wrote:
>>>
>>> On Thu, Nov 13, 2008 at 6:47 AM, Norman Maurer <norman@apache.org> wrote:
>>>>
>>>> Hi Robert,
>>>>
>>>> shouldn't the equals(Object) and hashCode() method get overridden in
>>>> JPAUser
>>>> to check for the right properties ?
>>>
>>> yes 8-)
>>>
>>> it's really just a toy implementation ATM
>>
>> OpenJPA is cool - good documentation and easy to use.
>>
>> JPA does raise some design questions. one interesting question is how
>> to re-use the same data access logic between managed (eg embedded in
>> geronimo) and unmanaged (eg running in phoenix). this runs into design
>> questions about how best to integrate james with transations.
>>
>> ideas?
>
> well, questions anyway :-)

always the best way to start :-)

> What do you expect typical transactions to include?

that's a good question, and i'm not sure there's a single answer. IMHO
it would be a useful to gather use cases. i'll create a wiki page to
record them.

IIRC stefano and norman have commented in the past about transactional
support in high performance SMTP environments so hopefully they'll
jump in

IIRC noel had some different requirements but i'm not too sure what
they were so hopefully he'll jump in

from an IMAP protocol perspective, it's just ensuring that a command
is completely executed or rolled back. (i suspect that this applies to
other protocols such as NNTP as well.)

> Do you expect more than one resource manager to participate?
>
> - e.g. some database stuff and when using activemq spooling delivery of a
> jms message and/or sending a jms message.  This would be more reliable with
> a JTA transaction manager.

for the spooling use case, i agree

developers customizing james (eg by adding fail fast SMTP handlers or
IMAP commands) may also want to span multiple resources

> Do you expect transactions to be entirely within james or if e.g. an ejb
> with a container managed tx sends some mail in-vm will some part of the
> delivery involve work in the transaction done by james?

i see two distinct use cases:

1. insertion into spool - in this case, the mail is delivery into the
spool and then picked up asynchronously (just as mail entering via a
protocol). in this case, the spool processing transaction would be
distinct and asynchronous in james.

2. direct delivery - in this case, the spool is bypassed and the mail
is fed directly into the mail processor using the calling thread. in
this case, i would expect the transation to span the processing. this
would allow mail delivery conditional on successful completion of the
calling transation.

> - if all the jpa work occurs after spooling I'd expect that transactions
> would not extend from an ejb to james -- getting a message off the spool
> might be made transactional but not the same tx as the ejb used to send it.
>  If the spooling is using jpa then putting the message in the spool ought to
> be in the ejb's tx.

yes

> I've heard that spring has a rather useful transaction manager abstraction,
> and there's a project (named after me) that adapts the geronimo tm to spring
> so you can get real xa tx in spring, but I haven't used this spring stuff.

cool

- robert

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


Mime
View raw message