0 Replies Latest reply on Jun 2, 2009 9:24 PM by israel.bgf

    Seam JPA Example For Tomcat - JTA

    israel.bgf
      I was looking the persistence.xml of the jpa example for tomcat in Seam examples and found it:

         <persistence-unit name="bookingDatabase" transaction-type="RESOURCE_LOCAL">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>java:comp/env/jdbc/TestDB</jta-data-source>

      It's in fact a doubt that i have about JTA/Resource Local transactions. Resource Local says that the application should manage the transactions of the entityManager, that's make sense since it's in Tomcat that don't have CMT, or BMT.

      But here is what i dont understand:

      <jta-data-souce>

      JTA is not only for the Container transaction stuff? Shouldnt it be <non-jta-data-source>? I set it to non-jta and it worked too.

      So my question is: When to use JTA/Non-JTA data-sources when using RESOURCE_LOCAL transaction?

      thks

      Israel