throw JPAExceptions in case of JPA errors instead of RuntimeExceptions - suggestion by xael-fry

catch in isInsideTransaction() is not needed anymore as well, as JPAException is never thrown from the try block