private boolean allDelete(IUserContext uc){
boolean bool=false;
Session session = null;
Transaction tx = null;
try{
session = HibernateSessionFactory.getSession();
tx = session.beginTransaction();
String strID[]=uc.getField("custom_field_50").getValue().split(",");
for(int i=0;i<strID.length;i++){
Engine wfuser = Engine.getInstance();
session.delete(session.load(UserTable.class, Integer.parseInt(strID[i])));
bool=wfuser.removeUserDefinition(Integer.parseInt(strID[i]));
if(!bool)
tx.rollback();
}
}catch(Exception ex)
{
ex.printStackTrace();
}finally{
HibernateSessionFactory.closeSession();
}
return true;
}删除不成功!又不抛异常,有没事务回滚