@Override
    public <T> void addSomeObjects(Iterable<T> objects) {
        Session session = null;
        try{
            session = sessionFactory.getCurrentSession();
            
            session.beginTransaction();
            
            for (T obj : objects){
                session.save(obj);
            }
            
            session.getTransaction().commit();
            
        }catch(RuntimeException e){
            try{
                    session.getTransaction().rollback();
            }catch(RuntimeException rbe){
            }
            throw e;
        }
        finally{
            if (session != null && session.isOpen()){
                session.close();
            }
        }
    }