persistence/play-java-jpa/src/main/java/play/db/jpa/DefaultJPAApi.java
@Deprecated
  public void withTransaction(final Runnable block) {
    try {
      withTransaction(
          () -> {
            block.run();
            return null;
          });
    } catch (Throwable t) {
      throw new RuntimeException("JPA transaction failed", t);
    }
  }
@Deprecated
  public void withTransaction(final Runnable block) {
    try {
      withTransaction(
          () -> {
            block.run();
            return null;
          });
    } catch (Throwable t) {
      throw new RuntimeException("JPA transaction failed", t);
    }
  }
Run a block of code in a JPA transaction.

@param block Block of code to execute
@deprecated Deprecated as of 2.7.0. Use {@link #withTransaction(Consumer)} instead.