I am doing the following sequence of commands:
EntityManagerFactory emf = ...;
javax.transaction.TransactionManager transactionManager = ...;
transactionManager.begin();
EntityManager em = emf.createEntityManager();
transactionManager.commit();
transactionManager.begin();
em.joinTransaction(); transactionManager.commit();
The call to joinTransaction() causes a NullPointerException:
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)
...
The physicalTransactionDelegate() has been set to null in the afterCompletion() hook from the first commit.
|