ebean-spring

Support for Spring transactions and IOC setup of Ebean server config

License

License

Categories

Categories

Ebean Data ORM
GroupId

GroupId

org.avaje.ebean
ArtifactId

ArtifactId

ebean-spring
Last Version

Last Version

7.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

ebean-spring
Support for Spring transactions and IOC setup of Ebean server config
Project URL

Project URL

http://www.avaje.org
Source Code Management

Source Code Management

https://github.com/ebean-orm/avaje-ebeanorm-spring.git

Download ebean-spring

How to add to project

<!-- https://jarcasting.com/artifacts/org.avaje.ebean/ebean-spring/ -->
<dependency>
    <groupId>org.avaje.ebean</groupId>
    <artifactId>ebean-spring</artifactId>
    <version>7.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.avaje.ebean/ebean-spring/
implementation 'org.avaje.ebean:ebean-spring:7.2.1'
// https://jarcasting.com/artifacts/org.avaje.ebean/ebean-spring/
implementation ("org.avaje.ebean:ebean-spring:7.2.1")
'org.avaje.ebean:ebean-spring:jar:7.2.1'
<dependency org="org.avaje.ebean" name="ebean-spring" rev="7.2.1">
  <artifact name="ebean-spring" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.avaje.ebean', module='ebean-spring', version='7.2.1')
)
libraryDependencies += "org.avaje.ebean" % "ebean-spring" % "7.2.1"
[org.avaje.ebean/ebean-spring "7.2.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.slf4j : slf4j-api jar [1.7,)

provided (5)

Group / Artifact Type Version
org.avaje.ebean : ebean jar 8.1.1
org.avaje.ebean : ebean-agent jar 8.1.1
org.avaje : avaje-agentloader jar 2.1.2
org.springframework : spring-context jar 4.1.7.RELEASE
org.springframework : spring-jdbc jar 4.1.7.RELEASE

test (3)

Group / Artifact Type Version
org.springframework : spring-test jar 4.1.7.RELEASE
org.avaje.composite : avaje-composite-testing-ebean pom 4.1
org.slf4j : jcl-over-slf4j jar [1.7,)

Project Modules

There are no modules declared in this project.

ebean-spring-txn

Integration with Spring managed transactions.

This project provides an Ebean ExternalTransactionManager specifically to integrate with Springs JDBC Transaction manager.

To use

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 and a simpler abstraction (as Spring transactions is designed to manage multiple resources such as JDBC Transactions and JPA EntityManager and Ebean only needs to manage JDBC Transactions).

org.avaje.ebean

Ebean ORM

Versions

Version
7.2.1
7.1.2