Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JBEAP-16733] [HAL-1581] JMS in domain mode reports error #326

Merged
merged 1 commit into from
Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public interface AddressTemplates {
String MESSAGING_ADDRESS = "/subsystem=messaging-activemq";
String SERVER_ADDRESS = "/server=*";

String MESSAGING_SUBSYSTEM_ADDRESS = "/{selected.host}/{selected.server}" + MESSAGING_ADDRESS;
String SELECTED_HOST_SELECTED_SERVER_ADDRESS = "/{selected.host}/{selected.server}";
String MESSAGING_SUBSYSTEM_ADDRESS = SELECTED_HOST_SELECTED_SERVER_ADDRESS + MESSAGING_ADDRESS;
String MESSAGING_SERVER_ADDRESS = MESSAGING_SUBSYSTEM_ADDRESS + SERVER_ADDRESS;
String MESSAGING_CORE_QUEUE_ADDRESS = MESSAGING_SUBSYSTEM_ADDRESS + SERVER_ADDRESS + "/queue=*";
String MESSAGING_JMS_QUEUE_ADDRESS = MESSAGING_SUBSYSTEM_ADDRESS + SERVER_ADDRESS + "/jms-queue=*";
Expand All @@ -37,6 +38,7 @@ public interface AddressTemplates {

String MESSAGING_SUBDEPLOYMENT_ADDRESS = SUBDEPLOYMENT_ADDRESS + MESSAGING_ADDRESS + SERVER_ADDRESS;

AddressTemplate SELECTED_HOST_SELECTED_SERVER_TEMPLATE = AddressTemplate.of(SELECTED_HOST_SELECTED_SERVER_ADDRESS);
AddressTemplate MESSAGING_SUBSYSTEM_TEMPLATE = AddressTemplate.of(MESSAGING_SUBSYSTEM_ADDRESS);
AddressTemplate MESSAGING_SERVER_TEMPLATE = AddressTemplate.of(MESSAGING_SERVER_ADDRESS);
AddressTemplate MESSAGING_CORE_QUEUE_TEMPLATE = AddressTemplate.of(MESSAGING_CORE_QUEUE_ADDRESS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.jboss.hal.dmr.Operation;
import org.jboss.hal.dmr.ResourceAddress;
import org.jboss.hal.dmr.dispatch.Dispatcher;
import org.jboss.hal.meta.AddressTemplate;
import org.jboss.hal.meta.StatementContext;
import org.jboss.hal.meta.security.Constraint;
import org.jboss.hal.resources.Icons;
Expand Down Expand Up @@ -126,8 +127,12 @@ public DestinationColumn(Finder finder,
for (ModelNode step : result) {
if (!step.isFailure()) {
for (ModelNode node : step.get(RESULT).asList()) {
ResourceAddress address = new ResourceAddress(node.get(ADDRESS));
destinations.add(new Destination(address, node.get(RESULT)));
AddressTemplate template = AddressTemplate.of(new ResourceAddress(node.get(ADDRESS)));
if (!template.firstName().equals(HOST)) {
//Add correct host and server before the messaging address if it is missing
template = SELECTED_HOST_SELECTED_SERVER_TEMPLATE.append(template);
}
destinations.add(new Destination(template.resolve(statementContext), node.get(RESULT)));
}
}
}
Expand Down