Topic
  • 1 reply
  • Latest Post - ‏2012-06-11T20:27:02Z by SystemAdmin
SystemAdmin
SystemAdmin
783 Posts

Pinned topic Join a global transaction in java batch

‏2012-06-11T20:19:36Z |
Hello,
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"/>

Thank You.
Updated on 2012-06-11T20:27:02Z at 2012-06-11T20:27:02Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    783 Posts

    Re: Join a global transaction in java batch

    ‏2012-06-11T20:27:02Z  
    Also 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?

    Thanks.