Transaction Rollback if named query is missing
Description
Activity
Show:
Brett Meyer January 7, 2014 at 6:42 PM
And if I remember correctly, we specifically had to rollback on an IAE in order to pass the JPA 2.1 TCK
Scott Marlow January 7, 2014 at 4:53 PM
You are right that this is new and a change. An IllegalArgumentException should cause tx to be marked for rollback only. If you look at the JPA 2.1 specification section 3.1.1 EntityManager interface description, you will see this small paragraph (bottom of page 79):
Runtime exceptions thrown by the methods of the EntityManager interface other than the LockTimeoutException will cause the current transaction to be marked for rollback if the persistence context is joined to that transaction.
Won't Fix
Details
Details
Assignee
Unassigned
UnassignedReporter
Sebastian Lorenz
Sebastian LorenzComponents
Affects versions
Priority
Created January 7, 2014 at 8:17 AM
Updated July 20, 2018 at 10:43 PM
Resolved January 7, 2014 at 6:42 PM
The transaction is marked for rollback when calling em.createNamedQuery with a query name that does not exist. This is a new behaviour in 4.3.0. An IllegalArgumentException shouldn't rollback the tx.