forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make quarkus-jdbc-mysql work properly in native mode for Java 17
Fixes: quarkusio#21366 (cherry picked from commit c59ef65)
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...in/java/io/quarkus/jdbc/mysql/runtime/graal/com/mysql/cj/jdbc/MySQLJDBCSubstitutions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} |