SessionFactory sf = getHibernateTemplate().getSessionFactory(); Session s = SessionFactoryUtils.getSession(sf,false);  try { s.connection().rollback(); } catch (SQLException sqle){ getHibernateTemplate().getJdbcExceptionTranslator(). translate("Attempting to rollback from SessionFactory",null,sqle); }
getHibernateTemplate().execute( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException ,SQLException { session.connection().rollback(); return null; }; });
    public void rollback()    {        SessionFactory sf =             getHibernateTemplate().getSessionFactory();        Session s = SessionFactoryUtils.getSession(sf,false);                try {            s.connection().rollback();        } catch (SQLException sqle){            getHibernateTemplate().getJdbcExceptionTranslator().            translate("Attempting to rollback from SessionFactory",null,sqle);        }    }