Every JPA call must be done in a transaction so, to enable JPA for a particular action, annotate it with @play.db.jpa.Transactional. This will compose your action method with a JPA Action that manages the transaction for you:

@Transactional
public static Result index() {
...
}

If your action perfoms only queries, you can set the readOnly attribute to true: