I am using Play2.1.1 Java with JPA2.0 with hibernate implementation.
to control the transaction by code instead of using @transactional like below is the normal JPA
something like this:
public static User getUserByIdentity(final AuthUserIdentity identity) { try { return JPA.withTransaction(new play.libs.F.Function0() { public User apply() { return User.findByAuthUserIdentity(identity); } }); } catch (Throwable t) { throw new RuntimeException(t); } }