[JBEAP-4688] Undertow connectors metrics doesn't work in domain #229
Conversation
@@ -178,7 +179,7 @@ public void loadDetails() { | |||
|
|||
ModelNode operation = new ModelNode(); | |||
operation.get(OP).set(READ_RESOURCE_OPERATION); | |||
operation.get(ADDRESS).set(Baseadress.get()); | |||
operation.get(ADDRESS).set(new ResourceAddress().add("host", serverStore.getSelectedServer().getHostName()).add("server", serverStore.getSelectedServer().getServerName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work in standalone mode. Instead RuntimeBaseAddress.get()
should be used, which returns the right address based on operation mode and selected host / server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did when I tested it. Standalone seems to go through a different code path. I will double check it later today to be 100% sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hpehl, you were right. It wasn't working for standalone. This should be fixed now.
@@ -178,7 +179,14 @@ public void loadDetails() { | |||
|
|||
ModelNode operation = new ModelNode(); | |||
operation.get(OP).set(READ_RESOURCE_OPERATION); | |||
operation.get(ADDRESS).set(Baseadress.get()); | |||
|
|||
if(Baseadress.get().hasDefined("profile")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you don't just use RuntimeBaseAddress.get()
? It's a shortcut for the code above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, because I didn't know about it. Let me test using RuntimeBaseAddress.get()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much cleaner now, thanks for the help @hpehl.
No description provided.