Forums Register Login

JPA Transaction management

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
"sachin yd " please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
+Pie Number of slices to send: Send
Just updating the code (missed adding the objects to be persisted in the BusinessComponent code...)
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2718 times.
Similar Threads
why won't changes that aren't persisted go away?
MZs Notes - Pg 159
Question about EntityManagerFactory and EntityManager
How to create a Template for EntityManager in a WebApplication
Exception in deployment of ejb ear
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:49:18.