自定義的action的不同方法執行同一service的同一方法,結果完全不同,為什麼?

hncsyilin發表於2008-03-28
public class RoleManagerAction extends DispatchAction{

private final static Logger logger = Logger.getLogger(RoleManagerAction.class);

public ActionForward save(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception
{

......
EventModel em = new EventModel(); em.setModel(hasRightAssign);
rightAssignService.delete(em);//不能更新資料庫和快取

.......
}




}

public ActionForward delete(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response){
RightAssignService rightAssignService = (RightAssignService)WebAppUtil.getService("rightAssignService", request);
.......
EventModel em = new EventModel();
em.setModel(rightAssign);
rightAssignService.delete(em);//能更新資料庫和快取
......
}
}

相關文章