-
1. Re: How to inject EntityManager (using CDI) into a WorkItemHandler
swiderski.maciej Jun 11, 2014 1:55 AM (in response to n_rajasekhar)1 of 1 people found this helpfulinject EntityManager to the producer and then pass that entity manager to your work item handler upon initialization.
HTH
-
2. Re: How to inject EntityManager (using CDI) into a WorkItemHandler
n_rajasekhar Jun 11, 2014 5:46 AM (in response to n_rajasekhar)Thanks for the response.
I could directly inject EntityManager into the Handler, when i set the class path of the WorkitemHandler in META-INF.
However, i am having issues while committing the transaction.
I am using
@Resource
UserTransaction ut;
this would have been begin already when Runtimeengine.startProcess().
But i need my own Transaction scope to control.
How can i achieve it?
Should i take a separate database connection for this task, by defining different persistenceUnit on persistence.xml?
Kind Regards,
Raja Sekhar.
-
3. Re: How to inject EntityManager (using CDI) into a WorkItemHandler
swiderski.maciej Jun 13, 2014 1:45 AM (in response to n_rajasekhar)I believe this has been resolved on jira, if that's the case please update this thread and mark it as resolved