Odwzorowania relacyjno-obiektowe 2 Transakcja Session session = factory.openSession(); try { session.getTransaction().setTimeout(3); session.getTransaction().begin(); session.getTransaction().commit(); } catch (RuntimeException e) { session.getTransaction().rollback(); throw e; } finally {session.close();}
{}