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

[JBEAP-4688] Undertow connectors metrics doesn't work in domain #229

Merged
merged 1 commit into from May 31, 2016

Conversation

iweiss
Copy link
Contributor

@iweiss iweiss commented May 27, 2016

No description provided.

@hpehl hpehl added the 2.8.x label May 30, 2016
@@ -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()));
Copy link
Member

@hpehl hpehl May 30, 2016

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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")) {
Copy link
Member

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.

Copy link
Contributor Author

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().

Copy link
Contributor Author

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.

@hpehl hpehl merged commit 1145ebe into hal:2.8.x May 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants