spring-framework / org.springframework.orm.jpa / DefaultJpaDialect / beginTransaction

beginTransaction

@Nullable open fun beginTransaction(entityManager: EntityManager, definition: TransactionDefinition): Any

Overrides JpaDialect.beginTransaction

This implementation invokes the standard JPA Transaction.begin method. Throws an InvalidIsolationLevelException if a non-default isolation level is set.

This implementation does not return any transaction data Object, since there is no state to be kept for a standard JPA transaction. Hence, subclasses do not have to care about the return value (null) of this implementation and are free to return their own transaction data Object.

See Also
javax.persistence.EntityTransaction#beginorg.springframework.transaction.InvalidIsolationLevelException#cleanupTransaction