Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

how could i do transaction in hibernate

i am preparing for an interview

how could i do transaction in hibernate
0
Manikandan Thiagarajan
Asked:
Manikandan Thiagarajan
1 Solution
 
Plk_In_EECommented:
Hi there,
i found some basic details about trnasctionin hiber nate and this will be use full during your interview.
Transactions can be used to prevent inappropriate usage of resources.
Transactions-handling is an important during EJB development
Hibernate has its own transaction class and you can get it through session interface.

Within one transaction you can do several operations and can commit transaction once after successfully completed all operations.

The advantage here is you can rollback all previous operations if one operation is fail in your operation batch.

Your transaction will commit when you call session.flush().

good luck.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now