Transaction Management in Spring
Transaction Management : Important aspect of transaction management is defining the right transaction boundary for e.g when should a transaction start,when should it end,when data should be committed in DB and when it should be rolled back (in the case of exception). Spring provides the facility of AOP based transaction management in which transactions can be associated to the business logic as a concern. Two types of transaction management are supported by the spring. Declarative transaction management Programmatic transaction management Programmatic transaction management : This means that you have to manage the transaction with the help of programming. That gives you extreme flexibility, but it is difficult to maintain. Declarative transaction management : This means you separate transaction management from the business code. You only use annotations or XML based configuration to manage the transactions. Choosing between Programmatic and