// Execute domain model update on domain controller and server managers
List<DomainUpdateApplierResponse> rsps = domainController.applyUpdatesToModel(updateSet.getDomainUpdates());
// Inform client of results
pushSingleResponse(responseQueue, new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_SET_ID, updateSet.setPlan.getId()));
DeploymentAction lastResponseAction = null;
for (int i = 0; i < rsps.size(); i++) {
DomainUpdateApplierResponse duar = rsps.get(i);
// There can be multiple domain updates for a given action, but we
// only send one response. Use this update result for the response if
// 1) it failed or 2) it's the last update associated with the action
if (duar.getDomainFailure() != null || duar.getHostFailures().size() > 0 || updateSet.isLastDomainUpdateForAction(i)) {
DeploymentAction action = updateSet.getDeploymentActionForDomainUpdate(i);
if (action != lastResponseAction) {
List<StreamedResponse> rspList = new ArrayList<StreamedResponse>(2);
rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_ID, action.getId()));
rspList.add(new StreamedResponse((byte) DomainClientProtocol.RETURN_DEPLOYMENT_ACTION_MODEL_RESULT, duar));
responseQueue.put(rspList);
lastResponseAction = action;
}
}