WAS : DSRA9110E: Statement is closed
在重复提交或多客户操作时老出现DSRA9110E: Statement is closed这个错误,大大们帮忙看下行不。谢谢了!
下面是我调用的方法,入口为selRefForProNo,error是在执行select()方法是出现的:
public class ReservationExecController extends ReservationBaseController {
public ReservationExecController(ActionMapping mapping,
HttpServletRequest request, HttpServletResponse response,
ConnectionManager connMgr, ActionMessageManager messageMgr) {
super(mapping, request, response, connMgr, messageMgr);
// TODO 自动生成的构造函数存根
}
public List<ReservationNodepad> selReservationNodepad(ReservationNodepad reservationNodepad)throws Exception{
ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);
return reservationExecManager.select(reservationNodepad);
}
public List<GenericCode> selGenericCode(GenericCode genericCode)throws Exception{
ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);
return reservationExecManager.select(genericCode);
}
public List<ReservationSchedule> selReservationSchedule(ReservationSchedule reservationSchedule) throws Exception{
ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);
reservationSchedule.setActiveIdx(ReservationParameter.ACTIVEIDX_Y);
return reservationExecManager.select(reservationSchedule);
}
public List<Proposal> selProposal(Proposal proposal) throws Exception{
ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);
return reservationExecManager.select(proposal);
}
public List<ReservationTransaction> selReservationTransaction(ReservationTransaction reservationTransaction) throws Exception{
ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);
return reservationExecManager.select(reservationTransaction);
}
public List<ReservationStatus> selReservationStatus(ReservationStatus reservationStatus) throws Exception{
ReservationExecManager reservationExecManager = new ReservationExecManager(connMgr,messageMgr);
return reservationExecManager.select(reservationStatus);
}
public boolean selRefForProNo(ReservationExecForm reservationExecForm) throws Exception{
boolean bool = true;
List<Proposal> proList = selProposal(reservationExecForm.getProposal());
bool = isValiProNo(proList);
bool = bool && ReservationParameter.LOAN_STATUS_SIGN.equals(proList.get(0).getStatus());
if(bool){
reservationExecForm.setProposal(proList.get(0));
selReservationExecForm(reservationExecForm);
ReservationLocking reservationLocking = new ReservationLocking();
reservationLocking.setProposalNo(reservationExecForm.getProposal().getProposalNo());
List<ReservationLocking> rlList = selReservationLock(reservationLocking);
if(rlList.size() > 0 && !request.getSession().getAttribute("username").toString().equals(rlList.get(0).getCreateBy())){
reservationExecForm.setIsLock(true);
reservationExecForm.setReservationLocking(rlList.get(0));
} else{
bool = bool && addReservationLocking(reservationLocking) == 1 ? true : false;
reservationExecForm.setIsLock(false);
reservationExecForm.setReservationLocking(reservationLocking);
}
getReservationExecList(reservationExecForm);
}
return bool;
}
public boolean selReservationExecForm(ReservationExecForm reservationExecForm) throws Exception{
boolean bool = true;
ReservationNodepad reservationNodepad = new ReservationNodepad();
reservationNodepad.setProposalNo(reservationExecForm.getProposal().getProposalNo());
Util.clearList(reservationExecForm.getRnList()).addAll(selReservationNodepad(reservationNodepad));
for (ReservationNodepad rn : reservationExecForm.getRnList()) {
if(rn.getCreatedDate() != null){
rn.getRnd().setCreatedDate(Util.DateStringConverter(rn.getCreatedDate(), ReservationParameter.DATE_FORMAT_ITEM));
}
if(rn.getLastUpdatedDate() != null){
rn.getRnd().setLastUpdatedDate(Util.DateStringConverter(rn.getLastUpdatedDate(), ReservationParameter.DATE_FORMAT_ITEM));
}
}
ReservationSchedule reservationSchedule = new ReservationSchedule();
reservationSchedule.setBranchCode(reservationExecForm.getProposal().getBranchCode());
Util.clearList(reservationExecForm.getRsList()).addAll(selReservationSchedule(reservationSchedule));
GenericCode genericCode = new GenericCode();
genericCode.setCategory(ReservationParameter.CATEGORY);
List<GenericCode> gcList = selGenericCode(genericCode);
for (GenericCode gc : gcList) {
if(gc.getGroupCode() == null || "".equals(gc.getGroupCode())){
reservationExecForm.getGcParentList().add(gc);
} else{
reservationExecForm.getGcChildList().add(gc);
}
}
reservationExecForm.getReservationStatus().setActiveIdx(ReservationParameter.ACTIVEIDX_Y);
reservationExecForm.getReservationStatus().setProposalNo(reservationExecForm.getProposal().getProposalNo());
List<ReservationStatus> rsList = selReservationStatus(reservationExecForm.getReservationStatus());
reservationExecForm.setReservationStatus(rsList.size() == 1 ? rsList.get(0) : null);
reservationExecForm.getReservationTransaction().setActiveIdx(ReservationParameter.ACTIVEIDX_Y);
reservationExecForm.getReservationTransaction().setProposalNo(reservationExecForm.getProposal().getProposalNo());
List<ReservationTransaction> rtList = selReservationTransaction(reservationExecForm.getReservationTransaction());
reservationExecForm.setReservationTransaction(rtList.size() == 1 ? rtList.get(0) : null);
if(rtList.size() > 0){
Date reserveDate = reservationExecForm.getReservationTransaction().getReserveDate();
reservationExecForm.setReserveDate(reserveDate == null ? null : Util.DateStringConverter(reserveDate, ReservationParameter.DATE_FORMAT_NOITEM));
} else{
reservationExecForm.setReserveDate(null);
}
Collections.sort(reservationExecForm.getRsList());
return bool;
}