Skip to content

Commit

Permalink
Merge pull request #6480 from luiseufrasio/FISH-7132-fix-jms-high-ava…
Browse files Browse the repository at this point in the history
…ilability-deployment-groups

FISH-7132 : config refs list being handled
  • Loading branch information
luiseufrasio authored Nov 15, 2023
2 parents 7c5eff9 + a9f33a3 commit 9b22bd2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ private DomainXmlPreParserException(String s) {
private List<ClusterData> clusters = new LinkedList<>();
private List<DeploymentGroupData> deploymentGroups = new LinkedList<>();
private List<String> configNames = new LinkedList<>();
private Map<String, String> mapServerConfig = new HashMap<>();
private ClusterData cluster;
private DeploymentGroupData deploymentGroup;
private String instanceName;
Expand Down Expand Up @@ -150,6 +151,10 @@ final List<String> getDGServerNames() {
return deploymentGroup.dgServerRefs;
}

public Map<String, String> getMapServerConfig() {
return this.mapServerConfig;
}

final String getConfigName() {
if(!valid)
return null;
Expand Down Expand Up @@ -275,9 +280,11 @@ private void handleServer() {
String configRef = getConfigRef();

printf("SERVER: " + name + ", ref= " + configRef);
mapServerConfig.put(name, configRef);

if (instanceName.equals(name))
if (instanceName.equals(name)) {
serverConfigRef = configRef;
}
}

private void handleDeploymentGroups() throws XMLStreamException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

import com.sun.enterprise.util.StringUtils;
import java.net.*;
import java.util.List;
import java.util.Map;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
Expand Down Expand Up @@ -133,7 +135,16 @@ private boolean handleServer(XMLStreamReader r) {
private boolean handleConfig(XMLStreamReader reader) {
String name = reader.getAttributeValue(null, NAME);

return !dxpp.getConfigName().equals(name);
Map<String, String> mapServerConfig = dxpp.getMapServerConfig();
boolean isConfigFromServerInDG = false;
List<String> dgServerNames = dxpp.getDGServerNames();
for (String server : mapServerConfig.keySet()) {
if (dgServerNames.contains(server) && mapServerConfig.get(server).equals(name)) {
isConfigFromServerInDG = true;
}
}

return !(dxpp.getConfigName().equals(name) || isConfigFromServerInDG);
}

/**
Expand Down

0 comments on commit 9b22bd2

Please sign in to comment.