• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPA Transaction management

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
We are developing an Application Managed JPA application.

The structure of the application is
Business Components which have business logic.
Tool generated DAO layer (JPA Managers and JPA Entities)

The usage would be like


Note: JPA Managers do invoke any transaction related APIs.


1) Is this valid code? i.e. would the update happen in a single transaction even if the EntityManagers obtained by all the classes (BusinessComponent, JPAEntity2Mgr, JPAEntity1Mgr) are different?
2) Is there a need to invoke the em.joinTransaction() api in the JPA Managers?
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"sachin yd " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
sachin y deshpande
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just updating the code (missed adding the objects to be persisted in the BusinessComponent code...)
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic