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

Spring transaction abstraction

So far, you have learned how to manage Hibernate transactions through JDBC (when Hibernate uses a single database) and through JTA (when Hibernate interacts with multiple databases). Spring can simplify transaction management in Hibernate applications by providing a transaction infrastructure to abstract the application code from the underlying transaction strategy. Using Spring, transaction management code that's bound to a specific API, such as JDBC or JTA, is omitted from the application. With Spring, you can manage transactions programmatically or declaratively. However, the declarative approach has certain advantages and is always preferred.

Transaction management with Spring is powerful and flexible because ...

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