From 0807569ee26447be40bad471e465461eeeb2bb76 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Sat, 3 Feb 2018 00:14:00 +1300 Subject: [PATCH] Update readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index ebead78bb..617ad1433 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,21 @@ Integration with Spring managed transactions. This project provides an Ebean `ExternalTransactionManager` specifically to integrate with Springs JDBC Transaction manager. +## To use + +```java +ServerConfig serverConfig = new ServerConfig(); + +// set SpringJdbcTransactionManager ... as the external transaction manager +serverConfig.setExternalTransactionManager(new SpringJdbcTransactionManager()); + +... +EbeanServer server = EbeanServerFactory.create(serverConfig); + +``` + +## Notes + You can use Ebean in Spring/Spring Boot *without* this and that case Ebean manages the Transactions itself. With Ebean managing the transactions there are some benefits with more control over JDBC batch, getGeneratedKeys