if (transport != null) {
transportBuilder.transport(new ChannelTransport(transport.getChannel()));
transportBuilder.distributedSyncTimeout(transport.getLockTimeout());
// Topology is retrieved from the channel
ProtocolStackConfiguration stack = transport.getChannelFactory().getProtocolStackConfiguration();
org.jboss.as.clustering.jgroups.TransportConfiguration.Topology topology = stack.getTransport().getTopology();
if (topology != null) {
String site = topology.getSite();
if (site != null) {
transportBuilder.siteId(site);
}
String rack = topology.getRack();
if (rack != null) {
transportBuilder.rackId(rack);
}
String machine = topology.getMachine();
if (machine != null) {
transportBuilder.machineId(machine);
}
}
transportBuilder.clusterName(this.name);
Executor executor = transport.getExecutor();
if (executor != null) {
transportBuilder.asyncTransportExecutor().factory(new ManagedExecutorFactory(executor));
}
RelayConfiguration relay = stack.getRelay();
if (relay != null) {
builder.site().localSite(relay.getSiteName());
}
}