Transaction is a single unit of work. It is single-threaded and abstracts the application from the underlying JDBC or JTA transaction. A transaction is associated with a session. It is instantiated by calling the session.beginTransaction() method. The transaction interface has the following methods:  void begin(): starts a new transaction  void commit(): ends a transaction. It does not work if the mode is FlushMode.NEVER  void rollback(): rolls back a transaction to the last commit forcefully  void setTimeout(int seconds): it sets a timeout for any transaction that is started by a call to begin the transaction on the particular instance.  booleanisAlive(): it returns a true or false and checks if the transaction is still alive.  void registerSynchronization(Synchronization s): this method registers a user synchronization callback for the transaction.  booleanwasCommited(): returns a true or false and checks if the transaction has been commited successfully.  booleanwasRolledBack(): returns a true or false and checks if the transaction rollback was successful.  Every transaction has a set of properties called ACID properties. ACID stands for Atomicity, Consistency, Isolation, Durability.