public static void redeployDeployments ( OperationContext context , PathAddress deploymentsRootAddress , Set < String > deploymentNames ) throws OperationFailedException { for ( String deploymentName : deploymentNames ) { PathAddress address = deploymentsRootAddress . append ( DEPLOYMENT , deploymentName ) ; OperationStepHandler handler = context . getRootResourceRegistration ( ) . getOperationHandler ( address , REDEPLOY ) ; ModelNode operation = addRedeployStep ( address ) ; ServerLogger . AS_ROOT_LOGGER . debugf ( "Redeploying %s at address %s with handler %s" , deploymentName , address , handler ) ; assert handler != null ; assert operation . isDefined ( ) ; context . addStep ( operation , handler , OperationContext . Stage . MODEL ) ; } }
We are adding a redeploy operation step for each specified deployment runtime name .