//It's all approximately just to show you a way how Spring does it. public void voteUp(long fooId) { EntityTransaction tx = em.getTransaction(); tx.begin(); try{ originalObject.voteUp(fooId); tx.commit(); }catch(Exception e){ tx.rallback(); throw e; } }