openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: Exceptions thrown from callbacks
Date Thu, 01 Feb 2007 23:55:55 GMT
On Feb 1, 2007, at 3:27 PM, Patrick Linskey wrote:

> 3.5.6:
>
> "Lifecycle callback methods may throw runtime exceptions. A runtime
> exception thrown by a callback method that executes within a  
> transaction
> causes that transaction to be rolled back. No further lifecycle  
> callback
> methods will be invoked after a runtime exception is thrown."

One other thing to check is if the tx is marked rollback only, should  
we not call anymore lifecycle events or is that "NoFurther lifecycle  
callback" clause supposed to apply to the single entity that failed.

> Further, I think that 3.7 trumps 3.5.6, so if an exception is thrown
> from a callback during a find(), we should be marking the transaction
> for rollback, rather than actually rolling it back.

That is standard EJB behavior and what I would expect from the EJB  
spec committee.

-dain

Mime
View raw message