Buggy code:
} existingInterfaces . remove ( interfaceProp . getName ( ) ) ; } else { affectedServers . addAll ( getServersAffectedByInterface ( interfaceProp . getName ( ) , hostModel , true ) ) ; } } for ( Map . Entry < String , ModelNode > entry : existingInterfaces . entrySet ( ) ) { affectedServers . addAll ( getServersAffectedByInterface ( entry . getKey ( ) , existingHostModel , true ) ) ; } final ModelNode startBindingGroups = startRoot . get ( SOCKET_BINDING_GROUP ) ; final ModelNode endBindingGroups = endRoot . get ( SOCKET_BINDING_GROUP ) ; final Map < String , ModelNode > existingBindingGroups = new HashMap < String , ModelNode > ( ) ; if ( startBindingGroups . isDefined ( ) ) for ( Property bindingGroup : startBindingGroups . asPropertyList ( ) ) { existingBindingGroups . put ( bindingGroup . getName ( ) , bindingGroup . getValue ( ) ) ; } if ( endBindingGroups . isDefined ( ) ) for ( Property bindingGroup : endBindingGroups . asPropertyList ( ) ) { if ( existingBindingGroups . containsKey ( bindingGroup . getName ( ) ) ) { if ( ! ( bindingGroup . getValue ( ) . equals ( existingBindingGroups . get ( bindingGroup . getName ( ) ) ) ) ) { affectedServers . addAll ( getServersAffectedBySocketBindingGroup ( bindingGroup . getName ( ) , endRoot , hostModel , serverProxies ) ) ; } existingBindingGroups . remove ( bindingGroup . getName ( ) ) ; } else { affectedServers . addAll ( getServersAffectedBySocketBindingGroup ( bindingGroup . getName ( ) , endRoot , hostModel , serverProxies ) ) ; } } for ( Map . Entry < String , ModelNode > entry : existingBindingGroups . entrySet ( ) ) { affectedServers . addAll ( getServersAffectedBySocketBindingGroup ( entry . getKey ( ) , startRoot , existingHostModel , serverProxies ) ) ; } final ModelNode startServerGroups = startRoot . get ( SERVER_GROUP ) ; final ModelNode endServerGroups = endRoot . get ( SERVER_GROUP ) ; final Map < String , ModelNode > existingServerGroups = new HashMap < String , ModelNode > ( ) ; if ( startServerGroups . isDefined ( ) ) for ( Property serverGroup : startServerGroups . asPropertyList ( ) ) { existingServerGroups . put ( serverGroup . getName ( ) , serverGroup . getValue ( ) ) ; } if ( endServerGroups . isDefined ( ) ) for ( Property serverGroup : endServerGroups . asPropertyList ( ) ) { if ( existingServerGroups . containsKey ( serverGroup . getName ( ) ) ) { if ( ! ( serverGroup . getValue ( ) . equals ( existingServerGroups . get ( serverGroup . getName ( ) ) ) ) ) { affectedServers . addAll ( getServersForGroup ( serverGroup . getName ( ) , hostModel , localHostInfo . getLocalHostName ( ) , serverProxies ) ) ; } existingServerGroups . remove ( serverGroup . getName ( ) ) ; } else { affectedServers . addAll ( getServersForGroup ( serverGroup . getName ( ) , hostModel , localHostInfo . getLocalHostName ( ) , serverProxies ) ) ; } } for ( Map . Entry < String , ModelNode > entry : existingServerGroups . entrySet ( ) ) { affectedServers . addAll ( getServersForGroup ( entry . getKey ( ) , hostModel , localHostInfo . getLocalHostName ( ) , serverProxies ) ) ; } if ( ! ( affectedServers . isEmpty ( ) ) ) { DomainControllerLogger . ROOT_LOGGER . domainModelChangedOnReConnect ( affectedServers ) ; final Set < ServerIdentity > runningServers = DomainServerUtils . getAllRunningServers ( hostModel , localHostInfo . getLocalHostName ( ) , serverProxies ) ; for ( ServerIdentity serverIdentity : affectedServers ) { if ( ! ( runningServers . contains ( serverIdentity ) ) ) { continue ; } final PathAddress serverAddress = PathAddress . pathAddress ( PathElement . pathElement ( HOST , serverIdentity . getHostName ( ) ) , PathElement . pathElement ( SERVER , serverIdentity . getServerName ( ) ) ) ; final OperationStepHandler handler = context . getResourceRegistration ( ) . getOperationHandler ( serverAddress , ServerRestartRequiredHandler . OPERATION_NAME ) ; final ModelNode op = new ModelNode ( ) ; op . get ( OP ) . set ( ServerRestartRequiredHandler . OPERATION_NAME ) ; op . get ( OP_ADDR ) . set ( serverAddress . toModelNode ( ) ) ; <START_BUG> context . addStep ( op , handler , IMMEDIATE ) ; <END_BUG> } } } context . stepCompleted ( ) ; } private void clearDomain ( final Resource rootResource ) { } private Resource getResource ( PathAddress resourceAddress , Resource rootResource , OperationContext context ) { } private Collection < ServerIdentity > getServersAffectedByPath ( final String pathName , final ModelNode hostModel , final boolean forDomain ) { } private Collection < ServerIdentity > getServerAffectedBySystemProperty ( final String propName , final boolean isDomain , final ModelNode domain , final String affectedGroup , final ModelNode host ) { } private boolean hasSystemProperty ( final ModelNode resource , final String propName ) { } private Collection < ServerIdentity > getServerAffectedByProfile ( final String profileName , final ModelNode domain , final ModelNode host , final Map < String , ProxyController > serverProxies ) { } private Collection < ServerIdentity > getServersAffectedByInterface ( final String interfaceName , final ModelNode hostModel , final boolean forDomain ) { } private Collection < ServerIdentity > getServersAffectedBySocketBindingGroup ( final String bindingGroupName , final ModelNode domain , final ModelNode host , final Map < String , ProxyController > serverProxies ) { } private Set < String > getOurServerGroups ( OperationContext context ) { } }

Fix:
context . addStep ( op , handler , MODEL , true ) ;