Buggy code:
public class TxStatsHandler extends AbstractRuntimeOnlyHandler { public enum TxStat { NUMBER_OF_TRANSACTIONS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_TRANSACTIONS , ModelType . LONG , true ) ) , NUMBER_OF_NESTED_TRANSACTIONS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_NESTED_TRANSACTIONS , ModelType . LONG , true ) ) , NUMBER_OF_HEURISTICS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_HEURISTICS , ModelType . LONG , true ) ) , NUMBER_OF_COMMITTED_TRANSACTIONS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_COMMITTED_TRANSACTIONS , ModelType . LONG , true ) ) , NUMBER_OF_ABORTED_TRANSACTIONS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_ABORTED_TRANSACTIONS , ModelType . LONG , true ) ) , NUMBER_OF_INFLIGHT_TRANSACTIONS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_INFLIGHT_TRANSACTIONS , ModelType . LONG , true ) ) , NUMBER_OF_TIMED_OUT_TRANSACTIONS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_TIMED_OUT_TRANSACTIONS , ModelType . LONG , true ) ) , NUMBER_OF_APPLICATION_ROLLBACKS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_APPLICATION_ROLLBACKS , ModelType . LONG , true ) ) , NUMBER_OF_RESOURCE_ROLLBACKS ( new org . jboss . as . controller . SimpleAttributeDefinition ( CommonAttributes . NUMBER_OF_RESOURCE_ROLLBACKS , ModelType . LONG , true ) ) ; private static final Map < String , TxStatsHandler . TxStat > MAP = new HashMap < String , TxStatsHandler . TxStat > ( ) ; final AttributeDefinition definition ; private TxStat ( final AttributeDefinition definition ) { } @ Override public final String toString ( ) { } public static synchronized TxStatsHandler . TxStat getStat ( final String stringForm ) { } } public static final TxStatsHandler INSTANCE = new TxStatsHandler ( ) ; private final TxStats txStats = TxStats . getInstance ( ) ; private TxStatsHandler ( ) { } @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { TxStatsHandler . TxStat stat = TxStatsHandler . TxStat . getStat ( operation . require ( NAME ) . asString ( ) ) ; if ( stat == null ) { context . getFailureDescription ( ) . set ( TransactionMessages . MESSAGES . unknownMetric ( operation . require ( NAME ) . asString ( ) ) ) ; } else { ModelNode result = new ModelNode ( ) ; switch ( stat ) { case NUMBER_OF_TRANSACTIONS : result . set ( txStats . getNumberOfTransactions ( ) ) ; break ; case NUMBER_OF_NESTED_TRANSACTIONS : result . set ( txStats . getNumberOfNestedTransactions ( ) ) ; break ; case NUMBER_OF_HEURISTICS : result . set ( txStats . getNumberOfHeuristics ( ) ) ; break ; case NUMBER_OF_COMMITTED_TRANSACTIONS : result . set ( txStats . getNumberOfCommittedTransactions ( ) ) ; break ; case NUMBER_OF_ABORTED_TRANSACTIONS : result . set ( txStats . getNumberOfAbortedTransactions ( ) ) ; break ; case NUMBER_OF_INFLIGHT_TRANSACTIONS : result . set ( txStats . getNumberOfInflightTransactions ( ) ) ; break ; case NUMBER_OF_TIMED_OUT_TRANSACTIONS : result . set ( txStats . getNumberOfTimedOutTransactions ( ) ) ; break ; case NUMBER_OF_APPLICATION_ROLLBACKS : result . set ( txStats . getNumberOfApplicationRollbacks ( ) ) ; break ; case NUMBER_OF_RESOURCE_ROLLBACKS : result . set ( txStats . getNumberOfResourceRollbacks ( ) ) ; break ; default : throw new IllegalStateException ( TransactionMessages . MESSAGES . unknownMetric ( stat ) ) ; } context . getResult ( ) . set ( result ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } void registerMetrics ( final ManagementResourceRegistration resourceRegistration ) { } }

Fix:
context . stepCompleted ( ) ;