Buggy code:
public class HibernateManagementAdaptor implements ManagementAdaptor { private static final HibernateManagementAdaptor INSTANCE = new HibernateManagementAdaptor ( ) ; private static final String PROVIDER_LABEL = "hibernate-persistence-unit" ; public static final String OPERATION_CLEAR = "clear" ; public static final String OPERATION_EVICTALL = "evict-all" ; public static final String OPERATION_SUMMARY = "summary" ; public static final String OPERATION_STATISTICS_ENABLED = "enabled" ; public static final String OPERATION_ENTITY_DELETE_COUNT = "entity-delete-count" ; public static final String OPERATION_ENTITY_INSERT_COUNT = "entity-insert-count" ; public static final String OPERATION_ENTITY_LOAD_COUNT = "entity-load-count" ; public static final String OPERATION_ENTITY_FETCH_COUNT = "entity-fetch-count" ; public static final String OPERATION_ENTITY_UPDATE_COUNT = "entity-update-count" ; public static final String ATTRIBUTE_QUERY_NAME = "query-name" ; public static final String OPERATION_QUERY_EXECUTION_COUNT = "query-execution-count" ; public static final String OPERATION_QUERY_EXECUTION_ROW_COUNT = "query-execution-row-count" ; public static final String OPERATION_QUERY_EXECUTION_AVG_TIME = "query-execution-average-time" ; public static final String OPERATION_QUERY_EXECUTION_MAX_TIME = "query-execution-max-time" ; public static final String OPERATION_QUERY_EXECUTION_MIN_TIME = "query-execution-min-time" ; public static final String OPERATION_QUERY_EXECUTION_MAX_TIME_QUERY_STRING = "query-execution-max-time-query-string" ; public static final String OPERATION_QUERY_CACHE_HIT_COUNT = "query-cache-hit-count" ; public static final String OPERATION_QUERY_CACHE_MISS_COUNT = "query-cache-miss-count" ; public static final String OPERATION_QUERY_CACHE_PUT_COUNT = "query-cache-put-count" ; public static final String OPERATION_FLUSH_COUNT = "flush-count" ; public static final String OPERATION_CONNECT_COUNT = "connect-count" ; public static final String OPERATION_SECOND_LEVEL_CACHE_HIT_COUNT = "second-level-cache-hit-count" ; public static final String OPERATION_SECOND_LEVEL_CACHE_MISS_COUNT = "second-level-cache-miss-count" ; public static final String OPERATION_SECOND_LEVEL_CACHE_PUT_COUNT = "second-level-cache-put-count" ; public static final String OPERATION_SESSION_CLOSE_COUNT = "session-close-count" ; public static final String OPERATION_SESSION_OPEN_COUNT = "session-open-count" ; public static final String OPERATION_COLLECTION_LOAD_COUNT = "collection-load-count" ; public static final String OPERATION_COLLECTION_FETCH_COUNT = "collection-fetch-count" ; public static final String OPERATION_COLLECTION_UPDATE_COUNT = "collection-update-count" ; public static final String OPERATION_COLLECTION_REMOVE_COUNT = "collection-remove-count" ; public static final String OPERATION_COLLECTION_RECREATED_COUNT = "collection-recreated-count" ; public static final String OPERATION_SUCCESSFUL_TRANSACTION_COUNT = "successful-transaction-count" ; public static final String OPERATION_COMPLETED_TRANSACTION_COUNT = "completed-transaction-count" ; public static final String OPERATION_PREPARED_STATEMENT_COUNT = "prepared-statement-count" ; public static final String OPERATION_CLOSE_STATEMENT_COUNT = "close-statement-count" ; public static final String OPERATION_OPTIMISTIC_FAILURE_COUNT = "optimistic-failure-count" ; private PersistenceUnitServiceRegistry persistenceUnitRegistry ; public static HibernateManagementAdaptor getInstance ( ) { } @ Override public void register ( final ManagementResourceRegistration jpaSubsystemDeployments , PersistenceUnitServiceRegistry persistenceUnitRegistry ) { } @ Override public Resource createPersistenceUnitResource ( final String persistenceUnitName , final String providerLabel ) { } private void registerStatisticOperations ( ManagementResourceRegistration jpaHibernateRegistration ) { } private void registerStatisticAttributes ( ManagementResourceRegistration jpaHibernateRegistration ) { } @ Override public String getIdentificationLabel ( ) { } abstract class AbstractMetricsHandler extends AbstractRuntimeOnlyHandler { abstract void handle ( ModelNode response , String name , ManagementLookup stats , OperationContext context ) { } @ Override protected void executeRuntimeStep ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final String puResourceName = address . getLastElement ( ) . getValue ( ) ; ManagementLookup stats = ManagementLookup . create ( persistenceUnitRegistry , puResourceName ) ; if ( stats != null ) { handle ( context . getResult ( ) , address . getLastElement ( ) . getValue ( ) , stats , context ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } } }

Fix:
context . stepCompleted ( ) ;