I'm trying to build JSF application and I'm using hibernate as ORM solution. The problem is that I got my code full of replicate code
Transaction tx = null;
Session session = SessionFactoryUtil.getInstance().getCurrentSession();
try {
tx = session.beginTransaction();
tx.commit();}
catch(Exception){}
in every function. Can spring help me avoid this? or what it could add as I found hibernate full of features?