Spring Transaction Managers

With ebean-spring-2.4.0 Ebean can transparently use an external Spring transaction manager. The com.avaje.ebean.springsupport.txn.SpringAwareJdbcTransactionManager has been updated so that Ebean is notified when a Spring managed transaction is commited or rolled back. With this notification Ebean then can automatically manage its L2 server cache etc.

To use the SpringAwareJdbcTransactionManager you need to set it via ServerConfig.setExternalTransactionManager() when constructing a EbeanServer instance.

Wiring via XML

The ebean-spring module contains some simple tests that use Spring XML wiring to configure an EbeanServer.

The default-ebean-server.xml provides a base configuration that specifies the SpringAwareJdbcTransactionManager and this is extended by the init-database.xml configuration to specify the DataSource and ddl generation options etc.

Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements
woResponse