On Wed, Feb 16, 2011 at 7:39 PM, Josh Canfield <[email protected]>wrote:

>
>
> How are you going to deal with failures when doing a multi-unit commit?
>
>
This is the big question. As EntityTransaction doesn't support 2-phase
commit, you can have a corrupt state in case of failures when doing a
multi-unit commit.


Here is for example what Seam doc says:

------------
You should avoid EntityTransaction if you have more than one persistence
unit in your application. Seam does not support installing multiple
EntityTransaction beans, and the EntityTransaction interface does not
support two phase commit, so unless you are careful you may have data
consistency issues. If you need multiple persistence units in your
application then we highly recommend using an EE 6 compatible server, such
as Jboss 6.
-------------

So may be we should forbid multi-unit commits in the same request? If
@CommitAfter is placed and there are more than one active transactions, we
can throw an exception.

Reply via email to