Transaction
Transaction (org.hibernate.Transaction)
A single-threaded, short-lived object used by the application to specify atomic units of work.While working with insert, update, delete, operations from an hibernate application onto the database then hibernate needs a logical Transaction, if we are selecting an object from the database then we do not require any logical transaction in hibernate. In order to begin a logical transaction in hibernate then we need to call a method beginTransaction() given by Session Interface.
Transaction transactionObj = sessionObj.beginTransaction();
sessionObj is an object of Session Interface