0 Replies Latest reply on Apr 1, 2014 10:51 PM by shinzey

    Should I enable JTA on data source to use with JPA?

    shinzey

      When configuring a data source, there is a JTA option, which is disabled by default:

      <datasource jta="false" jndi-name="java:/wt/testds" pool-name="testds" enabled="true" use-ccm="false">
      ...
      </datasource>
      
      

       

      Now I want to associate this data source with JPA with JTA transaction type:

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
          <persistence-unit name="test" transaction-type="JTA">
              <jta-data-source>java:/wt/testds</jta-data-source>
          </persistence-unit>
      </persistence>
      
      

       

      Do I also need to enable JTA on the data source?