Skip to content

Commit

Permalink
Make quarkus-jdbc-mysql work properly in native mode for Java 17
Browse files Browse the repository at this point in the history
Fixes: quarkusio#21366
(cherry picked from commit c59ef65)
  • Loading branch information
geoand authored and gsmet committed Nov 24, 2021
1 parent 8effd1f commit 05815f9
Showing 1 changed file with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package io.quarkus.jdbc.mysql.runtime.graal.com.mysql.cj.jdbc;

import java.sql.SQLException;

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;

@TargetClass(className = "com.mysql.cj.jdbc.ConnectionGroupManager")
final class ConnectionGroupManager {

@Substitute
public static void registerJmx() throws SQLException {
throw new IllegalStateException("Not Implemented in native mode");
}

}

@TargetClass(className = "com.mysql.cj.jdbc.jmx.LoadBalanceConnectionGroupManager")
final class LoadBalanceConnectionGroupManager {

@Substitute
public synchronized void registerJmx() throws java.sql.SQLException {
throw new IllegalStateException("Not Implemented in native mode");
}

}

@TargetClass(className = "com.mysql.cj.jdbc.jmx.ReplicationGroupManager")
final class ReplicationGroupManager {

@Substitute
public synchronized void registerJmx() throws SQLException {
throw new IllegalStateException("Not Implemented in native mode");
}

}

@TargetClass(className = "com.mysql.cj.jdbc.ha.ReplicationConnectionGroupManager")
final class ReplicationConnectionGroupManager {

@Substitute
public static void registerJmx() throws SQLException {
throw new IllegalStateException("Not Implemented in native mode");
}

}

class MySQLJDBCSubstitutions {
}

0 comments on commit 05815f9

Please sign in to comment.