| Sanne Grinovero Andrea Boriero Steve Ebersole
Scott Marlow just reading this too, and I agree with Steve: the specification sections you quote are not stating that this method should return null. So please clarify why you think this needs to be done.
My mistake, I was misreading the Hibernate ORM 5.1 code.
public EntityTransaction getTransaction() {
if ( transactionType == PersistenceUnitTransactionType.JTA ) {
throw new IllegalStateException( "A JTA EntityManager cannot use getTransaction()" );
}
return tx;
}
Where 'tx' is always expected to be non-null due to initialization:
protected transient TransactionImpl tx = new TransactionImpl( this );
I changed the title of this jira accordingly. Sorry about the mistake. |