Skip to content

Commit

Permalink
[WFLY-245] Fix for display of relay in runtime metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
rachmatowicz authored and bstansberry committed Jun 7, 2013
1 parent f2355b0 commit 7328b9b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,22 @@ public static void registerChannelProtocolMetrics(OperationContext context, Stri
protocolDefinitions.add(protocolDefinition);
}

// create the relay resource definition if element is defined
ResourceDefinition relayDefinition = null ;
if (stack.hasDefined(ModelKeys.RELAY)) {
relayDefinition = getProtocolMetricResourceDefinition(context, channelName, "relay.RELAY2");
}

// register the channel resource and its protocol resources
ManagementResourceRegistration subsystemRootRegistration = context.getResourceRegistrationForUpdate();
ManagementResourceRegistration channelRegistration = subsystemRootRegistration.registerSubModel(new ChannelInstanceResourceDefinition(channelName, true));
channelRegistration.registerSubModel(transportDefinition);
for (ResourceDefinition protocolDefinition : protocolDefinitions) {
channelRegistration.registerSubModel(protocolDefinition);
}
if (stack.hasDefined(ModelKeys.RELAY)) {
channelRegistration.registerSubModel(relayDefinition);
}
}

public static void addChannelProtocolMetricsDeregistrationStep(OperationContext context, String channelName) {
Expand Down

0 comments on commit 7328b9b

Please sign in to comment.