• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

JPA Transaction management  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Just updating the code (missed adding the objects to be persisted in the BusinessComponent code...)
 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!