Buggy code:
class HornetQServerAdd implements OperationStepHandler { private static final String DEFAULT_PATH = "messaging" ; private static final String DEFAULT_RELATIVE_TO = "jboss.server.data.dir" ; static final String PATH_BASE = "paths" ; static final String DEFAULT_BINDINGS_DIR = "bindings" ; static final String DEFAULT_JOURNAL_DIR = "journal" ; static final String DEFAULT_LARGE_MESSAGE_DIR = "largemessages" ; static final String DEFAULT_PAGING_DIR = "paging" ; public static final HornetQServerAdd INSTANCE = new HornetQServerAdd ( ) ; private HornetQServerAdd ( ) { } public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final HornetQServerResource resource = new HornetQServerResource ( ) ; context . addResource ( EMPTY_ADDRESS , resource ) ; final ModelNode model = resource . getModel ( ) ; for ( final AttributeDefinition attributeDefinition : CommonAttributes . SIMPLE_ROOT_RESOURCE_ATTRIBUTES ) { attributeDefinition . validateAndSet ( operation , model ) ; } model . get ( CommonAttributes . QUEUE ) . setEmptyObject ( ) ; model . get ( CommonAttributes . CONNECTION_FACTORY ) . setEmptyObject ( ) ; model . get ( CommonAttributes . JMS_QUEUE ) . setEmptyObject ( ) ; model . get ( CommonAttributes . JMS_TOPIC ) . setEmptyObject ( ) ; model . get ( CommonAttributes . POOLED_CONNECTION_FACTORY ) . setEmptyObject ( ) ; <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final List < ServiceController < ? > > controllers = new ArrayList < ServiceController < ? > > ( ) ; final ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; performRuntime ( context , resource , verificationHandler , controllers ) ; context . addStep ( verificationHandler , VERIFY ) ; if ( ( context . completeStep ( ) ) == ( ResultAction . ROLLBACK ) ) { for ( ServiceController < ? > controller : controllers ) { context . removeService ( controller . getName ( ) ) ; } } } } , RUNTIME ) ; } context . completeStep ( ) ; } private void performRuntime ( final OperationContext context , final HornetQServerResource resource , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { } private Configuration transformConfig ( final OperationContext context , String serverName , final ModelNode model ) throws OperationFailedException { } static void processAddressSettings ( final OperationContext context , final Configuration configuration , final ModelNode params ) throws OperationFailedException { } static void processSecuritySettings ( final OperationContext context , final Configuration configuration , final ModelNode params ) throws OperationFailedException { } static ServiceName createDirectoryService ( final String name , final ModelNode path , final ServiceTarget serviceTarget , ModelNode operation , final List < ServiceController < ? > > newControllers , final ServiceListener listener ) { } }

Fix:
if ( context . isNormalServer ( ) ) {