From 1557ebb195d9292918e92f4ef5695b2f57140714 Mon Sep 17 00:00:00 2001 From: linghengqian Date: Fri, 27 Sep 2024 18:03:02 +0800 Subject: [PATCH] Bump the minimum Seata Client version for Seata integration to 2.1.0 to serve nativeTest under GraalVM Native Image --- .../seata-all/2.1.0/proxy-config.json | 6 + .../seata-all/2.1.0/reflect-config.json | 818 ++++++++++++++++++ .../seata-all/2.1.0/resource-config.json | 170 ++++ kernel/transaction/type/base/seata-at/pom.xml | 29 +- ...ataATShardingSphereTransactionManager.java | 20 +- .../base/seata/at/SeataTransactionHolder.java | 2 +- .../SeataTransactionalSQLExecutionHook.java | 2 +- ...TShardingSphereTransactionManagerTest.java | 36 +- ...eataTransactionalSQLExecutionHookTest.java | 2 +- .../seata/at/fixture/MockMessageHandler.java | 60 +- .../seata/at/fixture/MockSeataServer.java | 4 +- .../at/fixture/MockedMysqlDataSource.java | 131 +++ pom.xml | 2 +- test/native/pom.xml | 10 +- 14 files changed, 1193 insertions(+), 99 deletions(-) create mode 100644 infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/proxy-config.json create mode 100644 infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/reflect-config.json create mode 100644 infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/resource-config.json create mode 100644 kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockedMysqlDataSource.java diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/proxy-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/proxy-config.json new file mode 100644 index 00000000000000..a731296c4a496f --- /dev/null +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/proxy-config.json @@ -0,0 +1,6 @@ +[ + { + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationCache"}, + "interfaces":["org.apache.seata.config.Configuration"] + } +] \ No newline at end of file diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/reflect-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/reflect-config.json new file mode 100644 index 00000000000000..452173e6195123 --- /dev/null +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/reflect-config.json @@ -0,0 +1,818 @@ +[ +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"[Lcom.fasterxml.jackson.databind.deser.Deserializers;" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"[Lcom.fasterxml.jackson.databind.ser.Serializers;" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.DataSourceProxy"}, + "name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.AbstractUndoLogManager"}, + "name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"io.seata.config.ConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"io.seata.config.ExtConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.TmNettyRemotingClient"}, + "name":"io.seata.core.auth.AuthSigner" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.context.ContextCoreLoader$ContextCoreHolder"}, + "name":"io.seata.core.context.ContextCore" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "name":"io.seata.core.model.ResourceManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.tm.TransactionManagerHolder$SingletonHolder"}, + "name":"io.seata.core.model.TransactionManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.AbstractNettyRemoting"}, + "name":"io.seata.core.rpc.hook.RpcHook" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "name":"io.seata.core.serializer.Serializer" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"io.seata.discovery.registry.RegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultRMHandler"}, + "name":"io.seata.rm.AbstractRMHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"io.seata.rm.datasource.undo.UndoExecutorHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"io.seata.rm.datasource.undo.UndoLogManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogParserFactory"}, + "name":"io.seata.rm.datasource.undo.UndoLogParser" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"io.seata.rm.datasource.undo.parser.spi.JacksonSerializer" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "name":"io.seata.rm.tcc.TCCResourceManager", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "name":"io.seata.saga.rm.SagaResourceManager", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"io.seata.sqlparser.EscapeHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.SQLVisitorFactory"}, + "name":"io.seata.sqlparser.SQLRecognizerFactory" +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"io.seata.sqlparser.druid.SQLOperateRecognizerHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"io.seata.sqlparser.struct.TableMetaCache" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.util.JdbcUtils"}, + "name":"io.seata.sqlparser.util.DbTypeParser" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationCache"}, + "name":"org.apache.seata.config.Configuration" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationCache$$Lambda/0x00007f3e4ba49308"}, + "name":"org.apache.seata.config.Configuration" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"org.apache.seata.config.apollo.ApolloConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"org.apache.seata.config.consul.ConsulConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"org.apache.seata.config.custom.CustomConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"org.apache.seata.config.etcd3.EtcdConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.FileConfigFactory"}, + "name":"org.apache.seata.config.file.SimpleFileConfig", + "methods":[{"name":"","parameterTypes":["java.io.File","java.lang.String"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"org.apache.seata.config.nacos.NacosConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"org.apache.seata.config.springcloud.SpringCloudConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "name":"org.apache.seata.config.zk.ZookeeperConfigurationProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.TmNettyRemotingClient"}, + "name":"org.apache.seata.core.auth.DefaultAuthSigner", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.context.ContextCoreLoader$ContextCoreHolder"}, + "name":"org.apache.seata.core.context.FastThreadLocalContextCore", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.context.ContextCoreLoader$ContextCoreHolder"}, + "name":"org.apache.seata.core.context.ThreadLocalContextCore" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.AbstractNettyRemoting"}, + "name":"org.apache.seata.core.rpc.hook.StatusRpcHook", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.NettyClientBootstrap"}, + "name":"org.apache.seata.core.rpc.netty.AbstractNettyRemotingClient$ClientHandler", + "methods":[{"name":"channelInactive","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"channelRead","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }, {"name":"channelWritabilityChanged","parameterTypes":["io.netty.channel.ChannelHandlerContext"] }, {"name":"close","parameterTypes":["io.netty.channel.ChannelHandlerContext","io.netty.channel.ChannelPromise"] }, {"name":"exceptionCaught","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Throwable"] }, {"name":"userEventTriggered","parameterTypes":["io.netty.channel.ChannelHandlerContext","java.lang.Object"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.NettyClientBootstrap$1"}, + "name":"org.apache.seata.core.rpc.netty.v1.ProtocolV1Decoder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.NettyClientBootstrap$1"}, + "name":"org.apache.seata.core.rpc.netty.v1.ProtocolV1Encoder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.FileRegistryProvider", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.consul.ConsulRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.custom.CustomRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.etcd3.EtcdRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.eureka.EurekaRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.nacos.NacosRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.raft.RaftRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.redis.RedisRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.sofa.SofaRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "name":"org.apache.seata.discovery.registry.zk.ZookeeperRegistryProvider" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultRMHandler"}, + "name":"org.apache.seata.rm.RMHandlerAT", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultRMHandler"}, + "name":"org.apache.seata.rm.RMHandlerXA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "name":"org.apache.seata.rm.datasource.DataSourceManager", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.StatementProxy"}, + "name":"org.apache.seata.rm.datasource.exec.postgresql.PostgresqlInsertExecutor", + "methods":[{"name":"","parameterTypes":["org.apache.seata.rm.datasource.StatementProxy","org.apache.seata.rm.datasource.exec.StatementCallback","org.apache.seata.sqlparser.SQLRecognizer"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"org.apache.seata.rm.datasource.sql.handler.dm.DmEscapeHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"org.apache.seata.rm.datasource.sql.handler.mariadb.MariadbEscapeHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"org.apache.seata.rm.datasource.sql.handler.mysql.MySQLEscapeHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"org.apache.seata.rm.datasource.sql.handler.oracle.OracleEscapeHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"org.apache.seata.rm.datasource.sql.handler.polardbx.PolarDBXEscapeHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"org.apache.seata.rm.datasource.sql.handler.postgresql.PostgresqlEscapeHandler", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "name":"org.apache.seata.rm.datasource.sql.handler.sqlserver.SqlServerEscapeHandler" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$$Lambda/0x00007f3e4bc2af00"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.StatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$$Lambda/0x00007f3e4bc17788"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.BaseTransactionalExecutor"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.ExecuteTemplate"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.AbstractUndoLogManager"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Field", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":[] }, {"name":"getKeyType","parameterTypes":[] }, {"name":"getName","parameterTypes":[] }, {"name":"getType","parameterTypes":[] }, {"name":"getValue","parameterTypes":[] }, {"name":"setKeyType","parameterTypes":["org.apache.seata.rm.datasource.sql.struct.KeyType"] }, {"name":"setName","parameterTypes":["java.lang.String"] }, {"name":"setType","parameterTypes":["int"] }, {"name":"setValue","parameterTypes":["java.lang.Object"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.KeyType", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.rm.datasource.sql.struct.KeyType", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$$Lambda/0x00007f3e4bc2af00"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.StatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$$Lambda/0x00007f3e4bc17788"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.BaseTransactionalExecutor"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.ExecuteTemplate"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.AbstractUndoLogManager"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.rm.datasource.sql.struct.Row", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":[] }, {"name":"getFields","parameterTypes":[] }, {"name":"setFields","parameterTypes":["java.util.List"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$$Lambda/0x00007f3e4bc2af00"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.StatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$$Lambda/0x00007f3e4bc17788"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.BaseTransactionalExecutor"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.ExecuteTemplate"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.AbstractUndoLogManager"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":[] }, {"name":"getRows","parameterTypes":[] }, {"name":"getTableName","parameterTypes":[] }, {"name":"setRows","parameterTypes":["java.util.List"] }, {"name":"setTableName","parameterTypes":["java.lang.String"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords$EmptyTableRecords", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.rm.datasource.sql.struct.TableRecords$EmptyTableRecords", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"org.apache.seata.rm.datasource.sql.struct.cache.DmTableMetaCache" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"org.apache.seata.rm.datasource.sql.struct.cache.MariadbTableMetaCache" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"org.apache.seata.rm.datasource.sql.struct.cache.MysqlTableMetaCache" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"org.apache.seata.rm.datasource.sql.struct.cache.OracleTableMetaCache" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"org.apache.seata.rm.datasource.sql.struct.cache.PolarDBXTableMetaCache" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"org.apache.seata.rm.datasource.sql.struct.cache.PostgresqlTableMetaCache", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "name":"org.apache.seata.rm.datasource.sql.struct.cache.SqlServerTableMetaCache" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$$Lambda/0x00007f3e4bc2af00"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.StatementProxy"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$$Lambda/0x00007f3e4bc17788"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.BaseTransactionalExecutor"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.ExecuteTemplate"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.AbstractUndoLogManager"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.rm.datasource.undo.BranchUndoLog", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":[] }, {"name":"getBranchId","parameterTypes":[] }, {"name":"getSqlUndoLogs","parameterTypes":[] }, {"name":"getXid","parameterTypes":[] }, {"name":"setBranchId","parameterTypes":["long"] }, {"name":"setSqlUndoLogs","parameterTypes":["java.util.List"] }, {"name":"setXid","parameterTypes":["java.lang.String"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$$Lambda/0x00007f3e4bc2af00"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.ConnectionProxy$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.StatementProxy"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog", + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$$Lambda/0x00007f3e4bc17788"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.AbstractDMLBaseExecutor$LockRetryPolicy"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.BaseTransactionalExecutor"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.ExecuteTemplate"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.AbstractUndoLogManager"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.rm.datasource.undo.SQLUndoLog", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true, + "methods":[{"name":"","parameterTypes":[] }, {"name":"getAfterImage","parameterTypes":[] }, {"name":"getBeforeImage","parameterTypes":[] }, {"name":"getSqlType","parameterTypes":[] }, {"name":"getTableName","parameterTypes":[] }, {"name":"setAfterImage","parameterTypes":["org.apache.seata.rm.datasource.sql.struct.TableRecords"] }, {"name":"setBeforeImage","parameterTypes":["org.apache.seata.rm.datasource.sql.struct.TableRecords"] }, {"name":"setSqlType","parameterTypes":["org.apache.seata.sqlparser.SQLType"] }, {"name":"setTableName","parameterTypes":["java.lang.String"] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"org.apache.seata.rm.datasource.undo.dm.DmUndoExecutorHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"org.apache.seata.rm.datasource.undo.dm.DmUndoLogManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"org.apache.seata.rm.datasource.undo.mariadb.MariadbUndoExecutorHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"org.apache.seata.rm.datasource.undo.mariadb.MariadbUndoLogManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"org.apache.seata.rm.datasource.undo.mysql.MySQLUndoExecutorHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"org.apache.seata.rm.datasource.undo.mysql.MySQLUndoLogManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"org.apache.seata.rm.datasource.undo.oracle.OracleUndoExecutorHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"org.apache.seata.rm.datasource.undo.oracle.OracleUndoLogManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogParserFactory"}, + "name":"org.apache.seata.rm.datasource.undo.parser.FastjsonUndoLogParser" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogParserFactory"}, + "name":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogParserFactory"}, + "name":"org.apache.seata.rm.datasource.undo.parser.KryoUndoLogParser" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogParserFactory"}, + "name":"org.apache.seata.rm.datasource.undo.parser.ProtostuffUndoLogParser" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"org.apache.seata.rm.datasource.undo.polardbx.PolarDBXUndoExecutorHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"org.apache.seata.rm.datasource.undo.polardbx.PolarDBXUndoLogManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"org.apache.seata.rm.datasource.undo.postgresql.PostgresqlUndoExecutorHolder", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"org.apache.seata.rm.datasource.undo.postgresql.PostgresqlUndoLogManager", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "name":"org.apache.seata.rm.datasource.undo.sqlserver.SqlServerUndoExecutorHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "name":"org.apache.seata.rm.datasource.undo.sqlserver.SqlServerUndoLogManager" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "name":"org.apache.seata.rm.datasource.xa.ResourceManagerXA", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultRMHandler"}, + "name":"org.apache.seata.rm.tcc.RMHandlerTCC", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "name":"org.apache.seata.rm.tcc.TCCResourceManager", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultRMHandler"}, + "name":"org.apache.seata.saga.rm.RMHandlerSaga", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "name":"org.apache.seata.saga.rm.SagaResourceManager", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "name":"org.apache.seata.serializer.hessian.HessianSerializer" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "name":"org.apache.seata.serializer.kryo.KryoSerializer" +}, +{ + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "name":"org.apache.seata.serializer.seata.SeataSerializer", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.PreparedStatementProxy"}, + "name":"org.apache.seata.sqlparser.SQLType", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.sqlparser.SQLType", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.druid.DruidDelegatingDbTypeParser"}, + "name":"org.apache.seata.sqlparser.druid.DruidDbTypeParserImpl", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.util.JdbcUtils"}, + "name":"org.apache.seata.sqlparser.druid.DruidDelegatingDbTypeParser", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.SQLVisitorFactory"}, + "name":"org.apache.seata.sqlparser.druid.DruidDelegatingSQLRecognizerFactory", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.druid.DruidDelegatingSQLRecognizerFactory"}, + "name":"org.apache.seata.sqlparser.druid.DruidSQLRecognizerFactoryImpl", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"org.apache.seata.sqlparser.druid.dm.DmOperateRecognizerHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"org.apache.seata.sqlparser.druid.mariadb.MariadbOperateRecognizerHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"org.apache.seata.sqlparser.druid.mysql.MySQLOperateRecognizerHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"org.apache.seata.sqlparser.druid.oracle.OracleOperateRecognizerHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"org.apache.seata.sqlparser.druid.polardbx.PolarDBXOperateRecognizerHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"org.apache.seata.sqlparser.druid.postgresql.PostgresqlOperateRecognizerHolder", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "name":"org.apache.seata.sqlparser.druid.sqlserver.SqlServerOperateRecognizerHolder" +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.sqlparser.struct.ColumnMeta", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.sqlparser.struct.IndexMeta", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.sqlparser.struct.IndexType", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "name":"org.apache.seata.sqlparser.struct.TableMeta", + "allDeclaredFields":true, + "queryAllDeclaredMethods":true, + "queryAllDeclaredConstructors":true +}, +{ + "condition":{"typeReachable":"org.apache.seata.tm.TransactionManagerHolder$SingletonHolder"}, + "name":"org.apache.seata.tm.DefaultTransactionManager", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "condition":{"typeReachable":"org.apache.seata.rm.datasource.exec.ExecuteTemplate"}, + "name":"io.seata.rm.datasource.exec.InsertExecutor" +} +] diff --git a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/resource-config.json b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/resource-config.json new file mode 100644 index 00000000000000..e1290a29430d1b --- /dev/null +++ b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.seata/seata-all/2.1.0/resource-config.json @@ -0,0 +1,170 @@ +{ + "resources":{ + "includes":[{ + "condition":{"typeReachable":"org.apache.seata.sqlparser.druid.DruidDbTypeParserImpl"}, + "pattern":"\\QMETA-INF/druid-driver.properties\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "pattern":"\\QMETA-INF/seata/io.seata.config.ConfigurationProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.TmNettyRemotingClient"}, + "pattern":"\\QMETA-INF/seata/io.seata.core.auth.AuthSigner\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.context.ContextCoreLoader$ContextCoreHolder"}, + "pattern":"\\QMETA-INF/seata/io.seata.core.context.ContextCore\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "pattern":"\\QMETA-INF/seata/io.seata.core.model.ResourceManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "pattern":"\\QMETA-INF/seata/io.seata.core.serializer.Serializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "pattern":"\\QMETA-INF/seata/io.seata.discovery.registry.RegistryProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "pattern":"\\QMETA-INF/seata/io.seata.rm.datasource.undo.parser.spi.JacksonSerializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.config.ConfigurationProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.config.ExtConfigurationProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.TmNettyRemotingClient"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.core.auth.AuthSigner\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.context.ContextCoreLoader$ContextCoreHolder"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.core.context.ContextCore\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.core.model.ResourceManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.tm.TransactionManagerHolder$SingletonHolder"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.core.model.TransactionManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.AbstractNettyRemoting"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.core.rpc.hook.RpcHook\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.core.serializer.Serializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.discovery.registry.RegistryProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.DefaultRMHandler"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.rm.AbstractRMHandler\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.rm.datasource.undo.UndoExecutorHolder\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.rm.datasource.undo.UndoLogManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogParserFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.rm.datasource.undo.UndoLogParser\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.rm.datasource.undo.parser.spi.JacksonSerializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.sqlparser.EscapeHandler\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.SQLVisitorFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.sqlparser.SQLRecognizerFactory\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.sqlparser.druid.SQLOperateRecognizerHolder\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.sqlparser.struct.TableMetaCache\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.util.JdbcUtils"}, + "pattern":"\\QMETA-INF/seata/org.apache.seata.sqlparser.util.DbTypeParser\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "pattern":"\\QMETA-INF/services/io.seata.config.ConfigurationProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.TmNettyRemotingClient"}, + "pattern":"\\QMETA-INF/services/io.seata.core.auth.AuthSigner\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.context.ContextCoreLoader$ContextCoreHolder"}, + "pattern":"\\QMETA-INF/services/io.seata.core.context.ContextCore\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "pattern":"\\QMETA-INF/services/io.seata.core.model.ResourceManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "pattern":"\\QMETA-INF/services/io.seata.core.serializer.Serializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "pattern":"\\QMETA-INF/services/io.seata.discovery.registry.RegistryProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "pattern":"\\QMETA-INF/services/io.seata.rm.datasource.undo.parser.spi.JacksonSerializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.config.ConfigurationProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.config.ConfigurationFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.config.ExtConfigurationProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.TmNettyRemotingClient"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.core.auth.AuthSigner\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.context.ContextCoreLoader$ContextCoreHolder"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.core.context.ContextCore\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.DefaultResourceManager"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.core.model.ResourceManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.tm.TransactionManagerHolder$SingletonHolder"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.core.model.TransactionManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.rpc.netty.AbstractNettyRemoting"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.core.rpc.hook.RpcHook\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.core.serializer.SerializerServiceLoader"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.core.serializer.Serializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.discovery.registry.RegistryFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.discovery.registry.RegistryProvider\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.DefaultRMHandler"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.rm.AbstractRMHandler\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoExecutorHolderFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.rm.datasource.undo.UndoExecutorHolder\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogManagerFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.rm.datasource.undo.UndoLogManager\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.UndoLogParserFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.rm.datasource.undo.UndoLogParser\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.undo.parser.JacksonUndoLogParser"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.rm.datasource.undo.parser.spi.JacksonSerializer\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.sqlparser.EscapeHandlerFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.sqlparser.EscapeHandler\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.SQLVisitorFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.sqlparser.SQLRecognizerFactory\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.common.loader.EnhancedServiceLoader"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.sqlparser.druid.SQLOperateRecognizerHolder\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.sql.struct.TableMetaCacheFactory"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.sqlparser.struct.TableMetaCache\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.rm.datasource.util.JdbcUtils"}, + "pattern":"\\QMETA-INF/services/org.apache.seata.sqlparser.util.DbTypeParser\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.config.FileConfiguration"}, + "pattern":"\\Q\\E" + }, { + "condition":{"typeReachable":"org.apache.seata.sqlparser.druid.DefaultDruidLoader"}, + "pattern":"\\Qlib/sqlparser/druid.jar\\E" + }]}, + "bundles":[] +} \ No newline at end of file diff --git a/kernel/transaction/type/base/seata-at/pom.xml b/kernel/transaction/type/base/seata-at/pom.xml index 4704e15b3557f0..01e137a143ecd2 100644 --- a/kernel/transaction/type/base/seata-at/pom.xml +++ b/kernel/transaction/type/base/seata-at/pom.xml @@ -29,7 +29,7 @@ - io.seata + org.apache.seata seata-all ${seata.version} @@ -62,34 +62,9 @@ - io.seata + org.apache.seata seata-all - ${seata.version} provided - - - com.oracle - ojdbc6 - - - com.alibaba - dubbo - - - com.sun - tools - - - com.sun - jconsole - - - - - - com.fasterxml.jackson.core - jackson-databind - test diff --git a/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManager.java b/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManager.java index a15aab97313764..08415f8a350cea 100644 --- a/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManager.java +++ b/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManager.java @@ -17,17 +17,17 @@ package org.apache.shardingsphere.transaction.base.seata.at; -import io.seata.config.FileConfiguration; -import io.seata.core.context.RootContext; -import io.seata.core.exception.TransactionException; -import io.seata.core.rpc.netty.RmNettyRemotingClient; -import io.seata.core.rpc.netty.TmNettyRemotingClient; -import io.seata.rm.RMClient; -import io.seata.rm.datasource.DataSourceProxy; -import io.seata.tm.TMClient; -import io.seata.tm.api.GlobalTransaction; -import io.seata.tm.api.GlobalTransactionContext; import lombok.SneakyThrows; +import org.apache.seata.config.FileConfiguration; +import org.apache.seata.core.context.RootContext; +import org.apache.seata.core.exception.TransactionException; +import org.apache.seata.core.rpc.netty.RmNettyRemotingClient; +import org.apache.seata.core.rpc.netty.TmNettyRemotingClient; +import org.apache.seata.rm.RMClient; +import org.apache.seata.rm.datasource.DataSourceProxy; +import org.apache.seata.tm.TMClient; +import org.apache.seata.tm.api.GlobalTransaction; +import org.apache.seata.tm.api.GlobalTransactionContext; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; import org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions; import org.apache.shardingsphere.transaction.api.TransactionType; diff --git a/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionHolder.java b/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionHolder.java index 350adfdf30c20e..270dcdbb7fc657 100644 --- a/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionHolder.java +++ b/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionHolder.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.transaction.base.seata.at; -import io.seata.tm.api.GlobalTransaction; +import org.apache.seata.tm.api.GlobalTransaction; import lombok.AccessLevel; import lombok.NoArgsConstructor; diff --git a/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHook.java b/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHook.java index b260101b465d1c..3195b99b6a2e27 100644 --- a/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHook.java +++ b/kernel/transaction/type/base/seata-at/src/main/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHook.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.transaction.base.seata.at; -import io.seata.core.context.RootContext; +import org.apache.seata.core.context.RootContext; import org.apache.shardingsphere.infra.database.core.connector.ConnectionProperties; import org.apache.shardingsphere.infra.executor.sql.hook.SQLExecutionHook; diff --git a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java index 5ca0caf94c620f..0d3f9a921ff96d 100644 --- a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java +++ b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataATShardingSphereTransactionManagerTest.java @@ -17,28 +17,28 @@ package org.apache.shardingsphere.transaction.base.seata.at; -import io.seata.core.context.RootContext; -import io.seata.core.protocol.RegisterRMRequest; -import io.seata.core.protocol.RegisterRMResponse; -import io.seata.core.protocol.RegisterTMRequest; -import io.seata.core.protocol.RegisterTMResponse; -import io.seata.core.protocol.transaction.GlobalBeginRequest; -import io.seata.core.protocol.transaction.GlobalBeginResponse; -import io.seata.core.protocol.transaction.GlobalCommitRequest; -import io.seata.core.protocol.transaction.GlobalCommitResponse; -import io.seata.core.protocol.transaction.GlobalRollbackRequest; -import io.seata.core.protocol.transaction.GlobalRollbackResponse; -import io.seata.core.rpc.netty.RmNettyRemotingClient; -import io.seata.core.rpc.netty.TmNettyRemotingClient; -import io.seata.rm.datasource.ConnectionProxy; -import io.seata.rm.datasource.DataSourceProxy; -import io.seata.tm.api.GlobalTransactionContext; import lombok.SneakyThrows; +import org.apache.seata.core.context.RootContext; +import org.apache.seata.core.protocol.RegisterRMRequest; +import org.apache.seata.core.protocol.RegisterRMResponse; +import org.apache.seata.core.protocol.RegisterTMRequest; +import org.apache.seata.core.protocol.RegisterTMResponse; +import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; +import org.apache.seata.core.protocol.transaction.GlobalBeginResponse; +import org.apache.seata.core.protocol.transaction.GlobalCommitRequest; +import org.apache.seata.core.protocol.transaction.GlobalCommitResponse; +import org.apache.seata.core.protocol.transaction.GlobalRollbackRequest; +import org.apache.seata.core.protocol.transaction.GlobalRollbackResponse; +import org.apache.seata.core.rpc.netty.RmNettyRemotingClient; +import org.apache.seata.core.rpc.netty.TmNettyRemotingClient; +import org.apache.seata.rm.datasource.ConnectionProxy; +import org.apache.seata.rm.datasource.DataSourceProxy; +import org.apache.seata.tm.api.GlobalTransactionContext; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader; -import org.apache.shardingsphere.test.fixture.jdbc.MockedDataSource; import org.apache.shardingsphere.transaction.api.TransactionType; import org.apache.shardingsphere.transaction.base.seata.at.fixture.MockSeataServer; +import org.apache.shardingsphere.transaction.base.seata.at.fixture.MockedMysqlDataSource; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; @@ -92,7 +92,7 @@ static void after() { @BeforeEach void setUp() { seataTransactionManager.init(Collections.singletonMap("sharding_db.ds_0", TypedSPILoader.getService(DatabaseType.class, "MySQL")), - Collections.singletonMap(DATA_SOURCE_UNIQUE_NAME, new MockedDataSource()), "Seata"); + Collections.singletonMap(DATA_SOURCE_UNIQUE_NAME, new MockedMysqlDataSource()), "Seata"); } @AfterEach diff --git a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHookTest.java b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHookTest.java index 474271c336a6b5..5bdde4dedcef30 100644 --- a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHookTest.java +++ b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/SeataTransactionalSQLExecutionHookTest.java @@ -17,7 +17,7 @@ package org.apache.shardingsphere.transaction.base.seata.at; -import io.seata.core.context.RootContext; +import org.apache.seata.core.context.RootContext; import org.apache.shardingsphere.infra.database.core.connector.ConnectionProperties; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; diff --git a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java index e1baff18706031..e823ef5f339c95 100644 --- a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java +++ b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockMessageHandler.java @@ -20,37 +20,37 @@ import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; -import io.seata.common.XID; -import io.seata.core.model.GlobalStatus; -import io.seata.core.protocol.AbstractMessage; -import io.seata.core.protocol.AbstractResultMessage; -import io.seata.core.protocol.HeartbeatMessage; -import io.seata.core.protocol.MergeResultMessage; -import io.seata.core.protocol.MergedWarpMessage; -import io.seata.core.protocol.ProtocolConstants; -import io.seata.core.protocol.RegisterRMRequest; -import io.seata.core.protocol.RegisterRMResponse; -import io.seata.core.protocol.RegisterTMRequest; -import io.seata.core.protocol.RegisterTMResponse; -import io.seata.core.protocol.ResultCode; -import io.seata.core.protocol.RpcMessage; -import io.seata.core.protocol.transaction.BranchCommitRequest; -import io.seata.core.protocol.transaction.BranchCommitResponse; -import io.seata.core.protocol.transaction.BranchRegisterRequest; -import io.seata.core.protocol.transaction.BranchRegisterResponse; -import io.seata.core.protocol.transaction.BranchReportRequest; -import io.seata.core.protocol.transaction.BranchReportResponse; -import io.seata.core.protocol.transaction.BranchRollbackRequest; -import io.seata.core.protocol.transaction.BranchRollbackResponse; -import io.seata.core.protocol.transaction.GlobalBeginRequest; -import io.seata.core.protocol.transaction.GlobalBeginResponse; -import io.seata.core.protocol.transaction.GlobalCommitRequest; -import io.seata.core.protocol.transaction.GlobalCommitResponse; -import io.seata.core.protocol.transaction.GlobalRollbackRequest; -import io.seata.core.protocol.transaction.GlobalRollbackResponse; -import io.seata.core.protocol.transaction.GlobalStatusRequest; -import io.seata.core.protocol.transaction.GlobalStatusResponse; import lombok.Getter; +import org.apache.seata.common.XID; +import org.apache.seata.core.model.GlobalStatus; +import org.apache.seata.core.protocol.AbstractMessage; +import org.apache.seata.core.protocol.AbstractResultMessage; +import org.apache.seata.core.protocol.HeartbeatMessage; +import org.apache.seata.core.protocol.MergeResultMessage; +import org.apache.seata.core.protocol.MergedWarpMessage; +import org.apache.seata.core.protocol.ProtocolConstants; +import org.apache.seata.core.protocol.RegisterRMRequest; +import org.apache.seata.core.protocol.RegisterRMResponse; +import org.apache.seata.core.protocol.RegisterTMRequest; +import org.apache.seata.core.protocol.RegisterTMResponse; +import org.apache.seata.core.protocol.ResultCode; +import org.apache.seata.core.protocol.RpcMessage; +import org.apache.seata.core.protocol.transaction.BranchCommitRequest; +import org.apache.seata.core.protocol.transaction.BranchCommitResponse; +import org.apache.seata.core.protocol.transaction.BranchRegisterRequest; +import org.apache.seata.core.protocol.transaction.BranchRegisterResponse; +import org.apache.seata.core.protocol.transaction.BranchReportRequest; +import org.apache.seata.core.protocol.transaction.BranchReportResponse; +import org.apache.seata.core.protocol.transaction.BranchRollbackRequest; +import org.apache.seata.core.protocol.transaction.BranchRollbackResponse; +import org.apache.seata.core.protocol.transaction.GlobalBeginRequest; +import org.apache.seata.core.protocol.transaction.GlobalBeginResponse; +import org.apache.seata.core.protocol.transaction.GlobalCommitRequest; +import org.apache.seata.core.protocol.transaction.GlobalCommitResponse; +import org.apache.seata.core.protocol.transaction.GlobalRollbackRequest; +import org.apache.seata.core.protocol.transaction.GlobalRollbackResponse; +import org.apache.seata.core.protocol.transaction.GlobalStatusRequest; +import org.apache.seata.core.protocol.transaction.GlobalStatusResponse; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; diff --git a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockSeataServer.java b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockSeataServer.java index 0cbb96005bd40a..a7d32ee88fcffd 100644 --- a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockSeataServer.java +++ b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockSeataServer.java @@ -26,8 +26,8 @@ import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; -import io.seata.core.rpc.netty.v1.ProtocolV1Decoder; -import io.seata.core.rpc.netty.v1.ProtocolV1Encoder; +import org.apache.seata.core.rpc.netty.v1.ProtocolV1Decoder; +import org.apache.seata.core.rpc.netty.v1.ProtocolV1Encoder; import lombok.Getter; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; diff --git a/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockedMysqlDataSource.java b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockedMysqlDataSource.java new file mode 100644 index 00000000000000..2c586fc1da09cd --- /dev/null +++ b/kernel/transaction/type/base/seata-at/src/test/java/org/apache/shardingsphere/transaction/base/seata/at/fixture/MockedMysqlDataSource.java @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.shardingsphere.transaction.base.seata.at.fixture; + +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.sql.DataSource; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Properties; +import java.util.logging.Logger; + +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.Mockito.RETURNS_DEEP_STUBS; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +@NoArgsConstructor +@Getter +@Setter +public class MockedMysqlDataSource implements DataSource, AutoCloseable { + + private String url = "jdbc:mysql://127.0.0.1:3306/foo_ds"; + + private String driverClassName; + + private String username = "root"; + + private String password = ""; + + private Integer maxPoolSize; + + private Integer minPoolSize; + + private List connectionInitSqls; + + private Properties jdbcUrlProperties; + + @Getter(AccessLevel.NONE) + @Setter(AccessLevel.NONE) + private Connection connection; + + @Setter(AccessLevel.NONE) + private boolean closed; + + private final Collection openedConnections = new HashSet<>(); + + @SuppressWarnings("MagicConstant") + @Override + public Connection getConnection() throws SQLException { + if (null != connection) { + return connection; + } + Connection result = mock(Connection.class, RETURNS_DEEP_STUBS); + when(result.getMetaData().getURL()).thenReturn(url); + when(result.createStatement(anyInt(), anyInt(), anyInt()).getConnection()).thenReturn(result); + doAnswer(invocation -> openedConnections.remove(result)).when(result).close(); + openedConnections.add(result); + return result; + } + + @Override + public Connection getConnection(final String username, final String password) throws SQLException { + return getConnection(); + } + + @SuppressWarnings("unchecked") + @Override + public T unwrap(final Class iface) throws SQLException { + if (iface.isInstance(this)) { + return (T) this; + } + throw new SQLException("Wrapped DataSource is not an instance of " + iface); + } + + @Override + public boolean isWrapperFor(final Class iface) { + return false; + } + + @Override + public PrintWriter getLogWriter() { + return null; + } + + @Override + public void setLogWriter(final PrintWriter out) { + } + + @Override + public void setLoginTimeout(final int seconds) { + } + + @Override + public int getLoginTimeout() { + return 0; + } + + @Override + public Logger getParentLogger() { + return null; + } + + @Override + public void close() { + closed = true; + } +} diff --git a/pom.xml b/pom.xml index 12978428b72569..c2e7286dd2130a 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ 5.12.7.Final 7.6.1.Final 3.2.1.Final - 2.0.0 + 2.1.0 4.1.112.Final 1.78.1 diff --git a/test/native/pom.xml b/test/native/pom.xml index d2e327c31734c5..5b6fda35fc3cc1 100644 --- a/test/native/pom.xml +++ b/test/native/pom.xml @@ -26,12 +26,6 @@ shardingsphere-test-native ${project.artifactId} - - - 1.8.0 - - org.apache.shardingsphere @@ -106,9 +100,9 @@ using Seata Client under GraalVM Native Image requires using the version release test - io.seata + org.apache.seata seata-all - ${seata.version} + 2.1.0 test