I am doing the following sequence of commands:
{code} EntityManagerFactory emf = ...; javax.transaction.TransactionManager transactionManager = ...;
transactionManager.begin(); EntityManager em = emf.createEntityManager(); transactionManager.commit();
transactionManager.begin(); em.joinTransaction(); // causes NPE transactionManager.commit(); {code}
The call to {{joinTransaction()}} causes a {{NullPointerException}}:
{code} java.lang.NullPointerException at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.explicitJoin(JtaTransactionCoordinatorImpl.java:136) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1569) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1557) at org.hibernate.ogm.jpa.impl.OgmEntityManager.joinTransaction(OgmEntityManager.java:561) ... {code}
The {{physicalTransactionDelegate () }} has been set to null in the {{afterCompletion()}} hook from the first commit.
|