Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1659098 - Use profile address to enable-statics for ejb3 runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
josejulio authored and spinder committed Apr 18, 2019
1 parent 5b0949f commit 09bf1f2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
Expand Up @@ -322,14 +322,14 @@ private void ensureGlobalEJB3StatisticsEnabled() {
return;
}
Address ejbAddress;

if ((BaseComponent<?>) getServerComponent() instanceof HostControllerComponent) {
ejbAddress = new Address(findManagedASServerComponent().getServerAddress());
} else {
ejbAddress = new Address(getServerComponent().getServerAddress());
}
ejbAddress.add("subsystem", "ejb3");
try {
if ((BaseComponent<?>) getServerComponent() instanceof HostControllerComponent) {
ejbAddress = new Address(findManagedASServerComponent().getProfileAddress());
} else {
ejbAddress = new Address(getServerComponent().getServerAddress());
}
ejbAddress.add("subsystem", "ejb3");

ejb3StatisticsEnabled = readAttribute(ejbAddress, "enable-statistics", Boolean.class);
if (!Boolean.TRUE.equals(ejb3StatisticsEnabled)) {
getLog().debug("Enabling global EJB3 statistics");
Expand Down
Expand Up @@ -190,6 +190,13 @@ protected Address getServerAddress() {
return serverAddress;
}

protected Address getProfileAddress() throws Exception {
String group = this.pluginConfiguration.getSimpleValue("group");
Address groupAddress = new Address("server-group", group);
String profile = readAttribute(groupAddress, "profile");
return new Address("profile", profile);
}

@Override
protected String getSocketBindingGroup() {
String socketBindingGroup;
Expand Down

0 comments on commit 09bf1f2

Please sign in to comment.