SpringSource Spring Framework tutorials and examples. Focusing on Spring 3 and above.
In the previous tip, I showed you how you could use XML to define a transaction. In this tip we will look at doing the same using annotations. It is blindly simple to use annotations for transactions. The tx namespace provides the <tx:annotation-driven> element. It appears like this : Java Code: <tx:annotation-driven transaction-manager="txManager" />
With this you can now define transaction rules very easily. This tag tells Spring to examine all beans in
<tx:annotation-driven transaction-manager="txManager" />