O'Reilly logo

Spring Persistence with Hibernate by Ahmad Seddighi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hibernate with Spring

As mentioned so far, Hibernate and Spring essentially are used for different purposes. Although there are many Spring features, including IoC, which make the Hibernate application more maintainable, the main feature of Spring in Hibernate applications is Aspect-Oriented Programming(AOP). AOP is an added feature to the traditional Object-Oriented programming. As you will see, this feature allows us to define common properties for a set of methods. In the case of Hibernate, suppose that there are a range of persistence methods that all need transaction management. AOP lets us to start transactions at the beginning of those methods and commit at the end, or roll back if any exception occurs during the method executions. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required