*/
@Override
public void execute() throws CapException {
List<IHGService> rService = new ArrayList<IHGService>();
List<IHGService> nrService = new ArrayList<IHGService>();
IHGService ts;
long startTime = System.currentTimeMillis();
for (ActionBean s : services) {
ts = s.getService();
int rt = s.getTimeout();
if (s.isRequired()) {
if (rt > rTimeout) {
rTimeout = rt;
}
rService.add(ts);
} else {
if (rt > nrTimeout) {
nrTimeout = rt;
}
nrService.add(ts);
}
//ts.setProperty(MCIConstants.TXNCD, getTxnCd());
ts.setSendData(getSendData());
ts.initConnection();
try {
ts.execute();
} catch (CapException e) {
throw e;
} catch (Exception e) {
throw new CapException(e, e.getClass());
}
}
executeService(startTime, rService, rTimeout);
executeService(startTime, nrService, nrTimeout);
// merge data
resultData = null;
for (ActionBean s : services) {
ts = s.getService();
if (s.getResponseAction() != null) {
resultData = s.getResponseAction().margeResponse(resultData, ts.getReceiveData());
} else if (resultData == null) {
resultData = ts.getReceiveData();
}
}
}