Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Port to machine agents shipping Java 11 #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@

### 2.0.1:
* Updated extension commons to 2.2.13.


### 3.0.0:
* Ported to machine agents shipping Java 11, which is now a minimum requirement.
16 changes: 13 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>com.appdynamics.extensions</groupId>
<artifactId>datapower-monitoring-extension</artifactId>
<version>2.0.1</version>
<version>3.0.0</version>
<packaging>jar</packaging>
<name>datapower-monitoring-extension</name>
<url>http://maven.apache.org</url>
Expand Down Expand Up @@ -48,6 +48,16 @@
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.soap</groupId>
<artifactId>jakarta.xml.soap-api</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.messaging.saaj</groupId>
<artifactId>saaj-impl</artifactId>
<version>3.0.4</version>
</dependency>
</dependencies>

<build>
Expand All @@ -58,8 +68,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ public class DataPowerMonitor extends ABaseMonitor {

private MonitorContextConfiguration configuration;

public DataPowerMonitor() {
soapMessageUtil = new SoapMessageUtil();
}

protected String getDefaultMetricPrefix() {
return METRIC_PREFIX;
}
Expand Down Expand Up @@ -98,6 +94,9 @@ protected void initializeMoreStuff(Map<String, String> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down