For HQL query I can do the following: entityManager.createQuery("update UserSession set userAgent = ''") .setHint("org.hibernate.timeout", 1) .executeUpdate(); But if I do the same for native sql query timeout doesn't work entityManager.createNativeQuery("update user_session set user_agent = ''") .setHint("org.hibernate.timeout", 1) .executeUpdate(); Is it possible to apply timeout for native query ? |