Skip to content

Commit

Permalink
WL#14068, Remove legacy integration with JBoss.
Browse files Browse the repository at this point in the history
  • Loading branch information
fjssilva committed May 19, 2020
1 parent 8d5f118 commit 43dd007
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 173 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

Version 8.0.22

- WL#14068, Remove legacy integration with JBoss.

Version 8.0.21

- WL#14051, Upgrade Protocol Buffers dependency to protobuf-java-3.11.4.
Expand Down
30 changes: 3 additions & 27 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
build to fail. -->
<available property="com.mysql.cj.prebuiltDocsPresent" file="${com.mysql.cj.dist.dir.prebuilt.docs}" />
<available property="com.mysql.cj.c3p0Present" classname="com.mchange.v2.c3p0.QueryConnectionTester" classpathref="com.mysql.cj.build.class.path" />
<available property="com.mysql.cj.jbossPresent"
classname="org.jboss.resource.adapter.jdbc.ValidConnectionChecker"
classpathref="com.mysql.cj.build.class.path" />
</target>

<!-- Load revision details either from git repository or from a revision-info.properties file. -->
Expand Down Expand Up @@ -763,7 +760,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<property name="com.mysql.cj.build.meta-inf.jee-imports" value="javax.sql;javax.naming;javax.naming.spi;javax.transaction.xa;resolution:=optional" />
<property name="com.mysql.cj.build.meta-inf.jmx-imports" value="javax.management;resolution:=optional" />
<property name="com.mysql.cj.build.meta-inf.integration-imports"
value="com.mchange.v2.c3p0;version=&quot;[0.9.1.2,1.0.0)&quot;;resolution:=optional,org.jboss.resource.adapter.jdbc;org.jboss.resource.adapter.jdbc.vendor;resolution:=optional" />
value="com.mchange.v2.c3p0;version=&quot;[0.9.1.2,1.0.0)&quot;;resolution:=optional" />
<property name="com.mysql.cj.build.meta-inf.logging-imports" value="org.slf4j;resolution:=optional" />
<property name="com.mysql.cj.build.meta-inf.xdevapi-imports"
value="com.google.protobuf;javax.security.auth.callback;javax.security.sasl;resolution:=optional" />
Expand All @@ -786,7 +783,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<property name="com.mysql.cj.build.meta-inf.interceptors-exports"
value="com.mysql.cj.jdbc.interceptors;version=&quot;${com.mysql.cj.build.meta-inf.osgid-version}&quot;" />
<property name="com.mysql.cj.build.meta-inf.integration-exports"
value="com.mysql.cj.jdbc.integration.c3p0;version=&quot;${com.mysql.cj.build.meta-inf.osgid-version}&quot;;uses:=&quot;com.mchange.v2.c3p0&quot;,com.mysql.cj.jdbc.integration.jboss;version=&quot;${com.mysql.cj.build.meta-inf.osgid-version}&quot;;uses:=&quot;org.jboss.resource.adapter.jdbc,org.jboss.resource.adapter.jdbc.vendor&quot;" />
value="com.mysql.cj.jdbc.integration.c3p0;version=&quot;${com.mysql.cj.build.meta-inf.osgid-version}&quot;;uses:=&quot;com.mchange.v2.c3p0&quot;" />
<property name="com.mysql.cj.build.meta-inf.configs-exports"
value="com.mysql.cj.configurations;version=&quot;${com.mysql.cj.build.meta-inf.osgid-version}&quot;,com.mysql.cj.conf;version=&quot;${com.mysql.cj.build.meta-inf.osgid-version}&quot;,com.mysql.cj.conf.url;version=&quot;${com.mysql.cj.build.meta-inf.osgid-version}&quot;" />
<property name="com.mysql.cj.build.meta-inf.legacy-exports"
Expand Down Expand Up @@ -1121,7 +1118,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<!-- Compile the driver including JDBC implementation and integration 'helpers' for third-party software. -->
<target name="compile-integration"
description="Compiles driver including JDBC implementation and integration 'helpers' for third-party software."
depends="compile-driver, -compile-integration-c3p0, -compile-integration-jboss" />
depends="compile-driver, -compile-integration-c3p0" />


<!-- Compile c3p0 integration. -->
Expand All @@ -1145,27 +1142,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
</target>


<!-- Compile jBoss integration. -->
<target name="-compile-integration-jboss" depends="compile-driver" if="${com.mysql.cj.jbossPresent}">
<echo>Compiling MySQL Connector/J-jboss integration with '${com.mysql.cj.build.jdk}' to '${com.mysql.cj.build.compiler.output}'</echo>

<javac sourcepath=""
srcdir="${com.mysql.cj.build.dir.driver}"
destdir="${com.mysql.cj.build.compiler.output}"
deprecation="off"
debug="${com.mysql.cj.build.addDebugInfo}"
fork="yes"
executable="${com.mysql.cj.build.jdk.javac}"
compiler="modern"
includeantruntime="false"
encoding="UTF-8">
<include name="com/mysql/cj/jdbc/integration/jboss/**" />
<classpath refid="com.mysql.cj.build.class.path" />
<compilerarg line="${javac.compilerarg}" />
</javac>
</target>


<!-- ******************* -->
<!-- ***** CLEANUP ***** -->
<!-- ******************* -->
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
import com.mysql.cj.jdbc.ha.ReplicationConnectionGroupManager;
import com.mysql.cj.jdbc.ha.ReplicationConnectionProxy;
import com.mysql.cj.jdbc.ha.SequentialBalanceStrategy;
import com.mysql.cj.jdbc.integration.jboss.MysqlValidConnectionChecker;
import com.mysql.cj.jdbc.jmx.ReplicationGroupManagerMBean;
import com.mysql.cj.log.Log;
import com.mysql.cj.log.ProfilerEvent;
Expand Down Expand Up @@ -1829,13 +1828,6 @@ public void testPropertiesDescriptionsKeys() throws Exception {
}
}

@Test
public void testBug29106() throws Exception {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class<?> checkerClass = cl.loadClass("com.mysql.cj.jdbc.integration.jboss.MysqlValidConnectionChecker");
((MysqlValidConnectionChecker) checkerClass.newInstance()).isValidConnection(this.conn);
}

@Test
public void testBug29852() throws Exception {
Connection lbConn = getLoadBalancedConnection();
Expand Down
24 changes: 0 additions & 24 deletions src/test/java/testsuite/regression/DataSourceRegressionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

Expand Down Expand Up @@ -81,7 +80,6 @@
import com.mysql.cj.jdbc.MysqlXid;
import com.mysql.cj.jdbc.PreparedStatementWrapper;
import com.mysql.cj.jdbc.StatementWrapper;
import com.mysql.cj.jdbc.integration.jboss.MysqlValidConnectionChecker;

import testsuite.BaseTestCase;
import testsuite.MockJndiContextFactory;
Expand Down Expand Up @@ -310,28 +308,6 @@ public void testBug19169() throws Exception {
assertEquals(testIntFlag, thawedDs.getMemorySizeProperty(PropertyKey.blobSendChunkSize).getValue().intValue());
}

/**
* Tests fix for BUG#20242 - MysqlValidConnectionChecker for JBoss doesn't work with MySQLXADataSources.
*
* @throws Exception
*/
@Test
public void testBug20242() throws Exception {
try {
Class.forName("org.jboss.resource.adapter.jdbc.ValidConnectionChecker");
} catch (Exception ex) {
System.out.println("The testBug20242() is ignored because required class isn't available:");
ex.printStackTrace();
return; // class not available for testing
}

MysqlXADataSource xaDs = new MysqlXADataSource();
xaDs.setUrl(dbUrl);

MysqlValidConnectionChecker checker = new MysqlValidConnectionChecker();
assertNull(checker.isValidConnection(xaDs.getXAConnection().getConnection()));
}

private void bindDataSource(String name, DataSource ds) throws Exception {
this.ctx.bind(name, ds);
}
Expand Down

0 comments on commit 43dd007

Please sign in to comment.