openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Exceptions thrown from callbacks
Date Wed, 07 Feb 2007 00:36:25 GMT
Ah, the perils of spec-writing...

On Feb 1, 2007, at 3:55 PM, Dain Sundstrom wrote:

> 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 "No Further  
> lifecycle callback" clause supposed to apply to the single entity  
> that failed.

More decisions. Is it

1. After a runtime exception is thrown (during any em method call)  
the tx is marked for rollback and no callbacks are called on any  
entity for any method

2. After a runtime exception is thrown from a user-defined callback,  
the tx is marked for rollback and no callbacks are called on any  
entity for any method

3. After a runtime exception is thrown from a user-defined callback,  
the tx is marked for rollback and no callbacks are called on the  
entity that stimulated the exception

4. After a runtime exception is thrown from a user-defined callback,  
the tx is marked for rollback and no callbacks are called on any  
entity during the execution of the current entity manager method

5. The provider decides what to do

6. Something else

Craig Russell
DB PMC
clr@apache.org http://db.apache.org/jdo



Mime
View raw message