We have a requirement in which we need to open an input stream and then call a business layer component to which an EntityManager is passed.
It seems that the Java Batch runs within a global transaction, which i did configure using using the ejb-jar.xml by defining a container transaction.
Now I am able to join the transaction by doing a entityManager.joinTransaction but only select statements are being fired, not the update/insert/deletes.
Is there a setting i am missing in the XJCL etc?
I have my persistence.xml configured to use transaction-type="JTA" and <property name="openjpa.TransactionMode" value="managed"/>
This topic has been locked.
1 reply Latest Post - 2012-06-11T20:27:02Z by SystemAdmin
Pinned topic Join a global transaction in java batch
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-06-11T20:27:02Z at 2012-06-11T20:27:02Z by SystemAdmin
SystemAdmin 110000D4XK783 PostsACCEPTED ANSWER
Re: Join a global transaction in java batch2012-06-11T20:27:02Z in response to SystemAdminAlso I observed that the transaction is not started. When i force a flush it throws an error :
Can only perform operation while a transaction is active
As I have already configured the ejb-jar.xml, I dont see whats wrong and why is the global transaction not getting started?