diff --git a/CHANGELOG.md b/CHANGELOG.md index bde4aa1..f377167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,4 +32,6 @@ ### 2.0.1: * Updated extension commons to 2.2.13. - \ No newline at end of file + +### 3.0.0: +* Ported to machine agents shipping Java 11, which is now a minimum requirement. diff --git a/pom.xml b/pom.xml index fcad820..04ec4e0 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.appdynamics.extensions datapower-monitoring-extension - 2.0.1 + 3.0.0 jar datapower-monitoring-extension http://maven.apache.org @@ -48,6 +48,16 @@ 4.13.1 test + + jakarta.xml.soap + jakarta.xml.soap-api + 3.0.2 + + + com.sun.xml.messaging.saaj + saaj-impl + 3.0.4 + @@ -58,8 +68,8 @@ maven-compiler-plugin 2.3.2 - 1.8 - 1.8 + 11 + 11 diff --git a/src/main/java/com/appdynamics/extensions/datapower/DataPowerMonitor.java b/src/main/java/com/appdynamics/extensions/datapower/DataPowerMonitor.java index 4b3d426..7ed5f1c 100644 --- a/src/main/java/com/appdynamics/extensions/datapower/DataPowerMonitor.java +++ b/src/main/java/com/appdynamics/extensions/datapower/DataPowerMonitor.java @@ -37,10 +37,6 @@ public class DataPowerMonitor extends ABaseMonitor { private MonitorContextConfiguration configuration; - public DataPowerMonitor() { - soapMessageUtil = new SoapMessageUtil(); - } - protected String getDefaultMetricPrefix() { return METRIC_PREFIX; } @@ -98,6 +94,9 @@ protected void initializeMoreStuff(Map args) { configuration = getContextConfiguration(); logger.info("initializing metric.xml file"); configuration.setMetricXml(args.get("metric-file"), Stat.Stats.class); + + // Keep this here instead of the constructor to ensure the proper class loader is used. + soapMessageUtil = new SoapMessageUtil(); } private boolean useBulkApi(Map server) { diff --git a/src/main/java/com/appdynamics/extensions/datapower/util/SoapMessageUtil.java b/src/main/java/com/appdynamics/extensions/datapower/util/SoapMessageUtil.java index 7a4c1b2..a07c9d4 100644 --- a/src/main/java/com/appdynamics/extensions/datapower/util/SoapMessageUtil.java +++ b/src/main/java/com/appdynamics/extensions/datapower/util/SoapMessageUtil.java @@ -12,13 +12,13 @@ import org.w3c.dom.NodeList; import javax.xml.namespace.QName; -import javax.xml.soap.MessageFactory; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; +import jakarta.xml.soap.MessageFactory; +import jakarta.xml.soap.SOAPBody; +import jakarta.xml.soap.SOAPElement; +import jakarta.xml.soap.SOAPEnvelope; +import jakarta.xml.soap.SOAPException; +import jakarta.xml.soap.SOAPMessage; +import jakarta.xml.soap.SOAPPart; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.util.Collection;