Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

doubts about configure persistence.xml

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hy,

Trying to configure a persistence.xml file I have the next doubts:

1)transaction-type="JTA" means the transaction will be managed by an ejb container? What I have read about JTA is the api used to manage distributed transactions but if we just have one database, why do we need to declare transaction-type="JTA" and not just "RESOURCE LOCAL"?

2) Is this possible to have transaction-type="RESOURCE LOCAL" and have the transactions managed by a EJB container?

3) If I have transaction-type="JTA", is it mandatory to have an element of type jta-data-source?

4)Why is mandatory to have transaction-type="JTA" with jta-data-source element?, why are they related and I cannot just specify properties indicating the datasource?

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic