Transaction represents a group of activities that must be performed as a single work unit. This clarifies that a transaction is complete if and only if all the work items within a work group results in success. If any of the work items fails, then the transaction as a whole will be treated as a failure. Managing transactions is vital not only for Enterprise applications but also for any flavour of applications. In this article we will explore the various services provided by the EJB container with respect to transaction management. This article assumes that the reader has a basic understanding on EJB technology such the various EJB containers, enterprise beans etc along with the fundamental concepts of transactions such as ACID properties, commit and rollback.
Its quite tough to explain the complete transaction management here, see the below links and spend some time to make yourself understand,