aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JPA Transaction management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JPA Transaction management" Watch "JPA Transaction management" New topic
Author

JPA Transaction management

sachin y deshpande
Greenhorn

Joined: May 12, 2004
Posts: 20
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?
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2712
    
    5

"sachin yd " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
sachin y deshpande
Greenhorn

Joined: May 12, 2004
Posts: 20
Just updating the code (missed adding the objects to be persisted in the BusinessComponent code...)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPA Transaction management
 
Similar Threads
why won't changes that aren't persisted go away?
MZs Notes - Pg 159
How to create a Template for EntityManager in a WebApplication
Exception in deployment of ejb ear
Question about EntityManagerFactory and EntityManager