persistence/play-java-jpa/src/main/java/play/db/jpa/DefaultJPAApi.java
@Deprecated
  public <T> T withTransaction(String name, boolean readOnly, Supplier<T> block) {
    return withTransaction(
        name,
        readOnly,
        entityManager -> {
          return block.get();
        });
  }
@Deprecated
  public <T> T withTransaction(String name, boolean readOnly, Supplier<T> block) {
    return withTransaction(
        name,
        readOnly,
        entityManager -> {
          return block.get();
        });
  }
@ Deprecated public < T > T withTransaction ( String name , boolean readOnly , Supplier < T > block ) { return withTransaction ( name , readOnly , entityManager -> { return block . get ( ) ; } ) ; }
Run a block of code in a JPA transaction.

@param name The persistence unit name
@param readOnly Is the transaction read-only?
@param block Block of code to execute
@deprecated Deprecated as of 2.7.0. Use {@link #withTransaction(String, boolean, Function)}
instead.
Run a block of code in a JPA transaction .