public boolean procMemberInfo(int userId, int order,int day) { boolean flag = false; Session session = null; Transaction ts = null; try { session = HibernateSessionFactory.getSession(); ts = session.beginTransaction(); CallableStatement c = ((SessionImpl) session).getBatcher() .prepareCallableStatement("{call MemberInfo_insert(?,?,?)}"); c.setInt(1, userId); c.setShort(2, (short)order); c.setInt(3, day); int ret=c.executeUpdate(); if(ret>0){ flag = true; } ts.commit(); return flag; } catch (Exception ex) { // TODO: handle exception ex.printStackTrace(); if(ts!=null){ ts.rollback(); } }finally{ if(session !=null){ session.close(); } } return flag; }