Have to admit that docs here are misleading (and implementation is not correct).
Just committed changes (should appear in next nightly build).
You will have to use EMFProviderBMT (new).
To use Bean Managed Transactions you have to configure:
server.properties:
Code:
jpa.emfProvider: com.isomorphic.jpa.EMFProviderBMT jpa.entityManager: persistence/em jpa.entityManagerFactory: persistence/emf
Code:
<persistence-context-ref>
<persistence-context-ref-name>persistence/em</persistence-context-ref-name>
<persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
</persistence-context-ref>
<persistence-unit-ref>
<persistence-unit-ref-name>persistence/emf</persistence-unit-ref-name>
<persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
</persistence-unit-ref>
Now EMFProviderCMT should be used only when you are accessing data source from EJB.
Best reagrds,
Alius
Leave a comment: