my dog learned polymorphism
The moose likes Object Relational Mapping and the fly likes Transaction management using JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Transaction management using JPA" Watch "Transaction management using JPA" New topic

Transaction management using JPA

Manikandan Swaminathan
Ranch Hand

Joined: Aug 10, 2008
Posts: 117
Hi all,

I am working on a application which involves transactions spanning across multiple pages.We are using JPA for persistence.
In this scenario, i am wondering about how to go handle the transactions using JPA?
The scenario is like this.. User selects some items on 1st page,adds something in the 2nd page. etc and finally submits in the 4th page..
Saving the attributes in session will be very costly as the perfomance of the application will be hit. Is there anyother wat to do it in a better way?
Can anyone please guide me on this?

Thanks a lot for your time.
James Boswell

Joined: Nov 09, 2011
Posts: 1051


I am a little confused what you are asking here. Firstly, you mention transactions using JPA and then you're not sure about storing data in the session. The 2 are completely separate issues.

Without knowing more about your front-end software stack, I cannot help with this.

With your JPA, I would say you need a single transaction around the submission of data on the final page.
I agree. Here's the link:
subject: Transaction management using JPA
It's not a secret anymore!