I\'m trying to persist some values to a MySql database from a small facelet application but keep getting this error. I had this same application with a JPS page and a servle
Just add @Transactional annotation on your method, e.g.
@Transactional // <-------------
public long setSessionState(StateEnum state, String hash) {
QSession s = QSession.session;
JPAUpdateClause upd = new JPAUpdateClause(em, s);
upd.set(s.state, state).where(s.hash.eq(hash));
return upd.execute();
}