Omaha #4392 Removed un-used JMX port configuration
Former-commit-id:41a03c3a1d
[formerly42ce2e6521
[formerly f119953ea5cdecdf853301cd0b253ce734244942]] Former-commit-id:42ce2e6521
Former-commit-id:701f6c96cb
This commit is contained in:
parent
012c843bf3
commit
e5019a23c9
2 changed files with 11 additions and 32 deletions
|
@ -35,6 +35,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 12, 2014 3521 bkowal Initial creation
|
||||
* Apr 20, 2015 4392 dlovely Removed un-used JMX port configuration
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -60,9 +61,6 @@ public class Wes2BridgeCase {
|
|||
@XmlElement
|
||||
private int qpidHttpPort;
|
||||
|
||||
@XmlElement
|
||||
private int qpidJmxPort;
|
||||
|
||||
@XmlElement
|
||||
private int jmsPort;
|
||||
|
||||
|
@ -153,21 +151,6 @@ public class Wes2BridgeCase {
|
|||
this.qpidHttpPort = qpidHttpPort;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the qpidJmxPort
|
||||
*/
|
||||
public int getQpidJmxPort() {
|
||||
return qpidJmxPort;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param qpidJmxPort
|
||||
* the qpidJmxPort to set
|
||||
*/
|
||||
public void setQpidJmxPort(int qpidJmxPort) {
|
||||
this.qpidJmxPort = qpidJmxPort;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the jmsPort
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,11 @@ import java.io.BufferedReader;
|
|||
import java.io.FileWriter;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -64,6 +68,7 @@ import com.raytheon.wes2bridge.configuration.jaxb.Wes2BridgeJaxbManager;
|
|||
* configuration that is no longer used and
|
||||
* updated EDEX re-configuration.
|
||||
* Apr 15, 2015 4392 dlovely Updates the new qpid json configuration now
|
||||
* Apr 20, 2015 4392 dlovely Removed un-used JMX port configuration
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -425,20 +430,15 @@ public class Wes2BridgeManager {
|
|||
String srcconfig_json = srcQpidDirectory + "/config.json";
|
||||
String config_json = qpidDirectory + "/config.json";
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try (BufferedWriter bw = this.getBufferedWriter(config_json);){
|
||||
|
||||
BufferedReader br = null;
|
||||
BufferedWriter bw = null;
|
||||
try {
|
||||
br = this.getBufferedReader(srcconfig_json);
|
||||
bw = this.getBufferedWriter(config_json);
|
||||
|
||||
String line = StringUtils.EMPTY;
|
||||
List<String> lines = Files.readAllLines(Paths.get(srcconfig_json), Charset.defaultCharset());
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
while( ( line = br.readLine() ) != null ) {
|
||||
for (String line : lines) {
|
||||
stringBuilder.append( line );
|
||||
}
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
Map<String, Object> attributesMap = mapper.readValue(stringBuilder.toString(), MAP_TYPE_REFERENCE);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -449,7 +449,7 @@ public class Wes2BridgeManager {
|
|||
Map<String, Object> port = (Map<String, Object>) ports.get(x);
|
||||
String name = (String) port.get(QPID_NAME);
|
||||
if (QPID_AMQP.equals(name)) {
|
||||
port.put(QPID_PORT, this.wes2BridgeCase.getQpidJmxPort());
|
||||
port.put(QPID_PORT, this.wes2BridgeCase.getJmsPort());
|
||||
} else if (QPID_HTTP.equals(name)) {
|
||||
port.put(QPID_PORT, this.wes2BridgeCase.getQpidHttpPort());
|
||||
}
|
||||
|
@ -459,10 +459,6 @@ public class Wes2BridgeManager {
|
|||
* Write the updated configuration file to its destination.
|
||||
*/
|
||||
mapper.defaultPrettyPrintingWriter().writeValue(bw, attributesMap);
|
||||
|
||||
} finally {
|
||||
br.close();
|
||||
bw.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue