Skip to content

Commit

Permalink
Merge pull request #196 from jamezp/WFARQ-99-main
Browse files Browse the repository at this point in the history
[WFARQ-99] Clean up dependencies and enabled dependency convergence.
  • Loading branch information
jamezp authored Aug 31, 2021
2 parents 341757a + 411ab25 commit 49d4b3f
Show file tree
Hide file tree
Showing 9 changed files with 410 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.as.controller.client.ModelControllerClient;
import org.jboss.as.controller.client.ModelControllerClientConfiguration;
import org.jboss.as.controller.client.helpers.ClientConstants;
import org.jboss.as.controller.client.helpers.DelegatingModelControllerClient;
import org.jboss.as.controller.client.helpers.Operations;
import org.jboss.as.controller.descriptions.ModelDescriptionConstants;
import org.jboss.dmr.ModelNode;
import org.jboss.dmr.Property;
import org.jboss.logging.Logger;
Expand All @@ -54,6 +54,7 @@
public abstract class CommonDeployableContainer<T extends CommonContainerConfiguration> implements DeployableContainer<T> {

private static final String JBOSS_URL_PKG_PREFIX = "org.jboss.ejb.client.naming";
private static final String READ_OPERATION_DESCRIPTION_OPERATION = "read-operation-description";

private T containerConfig;

Expand Down Expand Up @@ -231,14 +232,14 @@ protected boolean isOperationAttributeSupported(final ModelNode address, final S
final ModelControllerClient client = getModelControllerClient();
final ModelNode op;
if (address == null) {
op = Operations.createOperation(ModelDescriptionConstants.READ_OPERATION_DESCRIPTION_OPERATION);
op = Operations.createOperation(READ_OPERATION_DESCRIPTION_OPERATION);
} else {
op = Operations.createOperation(ModelDescriptionConstants.READ_OPERATION_DESCRIPTION_OPERATION, address);
op = Operations.createOperation(READ_OPERATION_DESCRIPTION_OPERATION, address);
}
op.get(ModelDescriptionConstants.NAME).set(operationName);
op.get(ClientConstants.NAME).set(operationName);
final ModelNode result = client.execute(op);
if (Operations.isSuccessfulOutcome(result)) {
final ModelNode params = Operations.readResult(result).get(ModelDescriptionConstants.REQUEST_PROPERTIES);
final ModelNode params = Operations.readResult(result).get("request-properties");
return params.keys().contains(attributeName);
}
final String msg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;

import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

import org.jboss.logging.Logger;
import org.xnio.IoUtils;

/**
* A provider for the JSR160 connection.
Expand Down Expand Up @@ -85,6 +83,9 @@ public MBeanServerConnection getConnection(long timeout) {

@Override
public void close() throws IOException {
IoUtils.safeClose(jmxConnector);
if (jmxConnector != null) try {
jmxConnector.close();
} catch (Throwable ignore) {
}
}
}
24 changes: 24 additions & 0 deletions container-embedded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,30 @@
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling-river</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.remotingjmx</groupId>
<artifactId>remoting-jmx</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-common</artifactId>
Expand Down
16 changes: 16 additions & 0 deletions container-managed-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@
</properties>

<dependencies>
<dependency>
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.remotingjmx</groupId>
<artifactId>remoting-jmx</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-common-domain</artifactId>
Expand Down
11 changes: 11 additions & 0 deletions integration-tests/junit5-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@
<artifactId>okhttp</artifactId>
<scope>test</scope>
</dependency>
<!-- Required by okhttp, but also transitive to it causing a dependency convergence -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
Expand Down
Loading

0 comments on commit 49d4b3f

Please sign in to comment.