use of org.jboss.as.test.integration.domain.mixed.LegacySubsystemConfigurationUtil in project wildfly by wildfly.
the class DomainAdjuster640 method replaceActiveMqWithMessaging.
private Collection<? extends ModelNode> replaceActiveMqWithMessaging(PathAddress subsystem) throws Exception {
final List<ModelNode> list = new ArrayList<>();
//messaging-activemq does not exist, remove it and the extension
list.add(createRemoveOperation(subsystem));
list.add(createRemoveOperation(PathAddress.pathAddress(EXTENSION, "org.wildfly.extension.messaging-activemq")));
//Add legacy messaging extension
list.add(createAddOperation(PathAddress.pathAddress(EXTENSION, "org.jboss.as.messaging")));
//Get the subsystem add operations (since the subsystem is huge, and there is a template, use the util)
LegacySubsystemConfigurationUtil util = new LegacySubsystemConfigurationUtil(new org.jboss.as.messaging.MessagingExtension(), "messaging", "ha", "subsystem-templates/messaging.xml");
list.addAll(util.getSubsystemOperations());
//Now adjust the things from the template which are not available in the legacy server
//http acceptors and connectors are not available
PathAddress messaging = PathAddress.pathAddress(PROFILE, "full-ha").append(SUBSYSTEM, "messaging");
PathAddress server = messaging.append("hornetq-server", "default");
list.add(createRemoveOperation(server.append("http-acceptor", "http-acceptor")));
list.add(createRemoveOperation(server.append("http-acceptor", "http-acceptor-throughput")));
list.add(createRemoveOperation(server.append("http-connector", "http-connector")));
list.add(createRemoveOperation(server.append("http-connector", "http-connector-throughput")));
//TODO here we should add a remote connector, for now use the in-vm one
list.add(getWriteAttributeOperation(server.append("broadcast-group", "bg-group1"), "connectors", new ModelNode().add("in-vm")));
return list;
}
Aggregations