*Remove the app ref and send the event unless this is part of a
*redeployment sequence of operations and the attributes for the app
*ref will not change as a result of the deployment, compared to
*their current values.
*/
ApplicationRef ref = ApplicationReferenceHelper.findCurrentAppRef(
deploymentCtx, target.getName(), req.getName());
boolean needToRemoveRef = true;
DeploymentContext.SavedApplicationRefInfo info = null;
if (req.isRedeployInProgress()) {
/*
*Save a pointer to the existing app ref for use during the later
*disassociate phase.
*/
String virtualServers = null;
Properties optionalAttrs = req.getOptionalAttributes();
if (optionalAttrs != null) {
virtualServers = (String) optionalAttrs.get(ServerTags.VIRTUAL_SERVERS);
}
if (virtualServers == null && ref.getVirtualServers() != null) {
// if user does not specify virtual server in a redeployment
// preserve the value from last deployment
virtualServers = ref.getVirtualServers();
// also set it in request so subsequent retrieval
// will get the proper value
if (req.getOptionalAttributes() == null) {
Properties optionalAttributes = new Properties();