• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

JPA Transaction management

 
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
Firefox Browser Fedora 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...)
 
What a show! What atmosphere! What fun! What a tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!