AnsweredAssumed Answered

Non-Spring JPA Transactions

Question asked by bthule on Dec 2, 2013
Latest reply on Dec 5, 2013 by frederikheremans1
I will be using a non-JTA persistence unit (eg
<persistence-unit transaction-type="RESOURCE_LOCAL">
).  And I will sometimes be creating an EntityManager and transaction, doing work in my code, and then calling Activiti.  And of course, other times, Activiti will be creating its own em and transaction, and calling my application code.  How can I configure Activiti to get/put the em from/to Guice or CDI?

Somewhat related: I know that Spring support in Activiti is not required, but with the documentation and the "Activiti in Action" book referencing Spring so much, it makes me worried about how stable/fully functional Activiti will be without it.  For instance, the Activiti documentation for JPA seems to assume that Spring will be used– which in my case it will not.  Unless it is just the documentation, then It seems like Spring and Activiti are currently tightly coupled, and I will lose important functionality unless I use Spring.  It seems that Activiti should have had a Spring "plugin" that could be swapped out for a Guice or CDI "plugin".