Puedes usar persist en lugar de save, ademas usa una transaction generandola de la session de hibernate, cuando termines y todo se inserte correctamente entonces le das transaction.commit y si hay error le das transaction.rollback.
ejemplo Usando Spring y Hibernate:
Código Java:
Ver originalSession s = null;
Transaction tx = null;
try {
s = this.getHibernateTemplate().getSessionFactory().openSession();
tx = s.beginTransaction();
/* Tu codigo de persist*/
for(Object object
: listaObjects
) { s.persist(object);
}
tx.commit();
} catch(HibernateException he) {
LOG.error(he.getMessage(), he);
if(Validator.isNotNull(tx)) {
tx.rollback();
LOG.error("Transaction Rolled Back.");
}
} finally {
if(Validator.isNotNull(s)) {
s.clear();
s.close();
LOG.debug("Hibernate Session Cleared and Closed.");
}
}