On 08/14/2014 05:05 PM, Stuart Douglas wrote:
>
> Checking for STATUS_ROLLEDBACK, helps my test case somewhat. I am still
> seeing the below mention (WFLY-3730) JPA container failure as a result
> of the transaction status changing from active, to rolled back, after I
> called transaction.getStatus() (which returned STATUS_ACTIVE).
>
> I'm not quite sure what to do with the "IllegalStateException" that is
> thrown in either case (EJB or JPA container), since the transaction
> status can change after StatefulSessionSynchronizationInterceptor checks
> the status (e.g. in the transaction time out case that my testing is
> purposely hitting).
That is a massive edge case and there is not really anything that can be
done about it, all you could really do is catch the exception and log it
at debug.
Stuart
Agreed, I tried one suggestion of catching the ISE and ignoring it if
the transaction is ended but that doesn't help, as we fail elsewhere.
It is a massive edge case, as we deal with transactions all over the
place.
Thanks for the response.
Scott