Skip to content

Commit

Permalink
Bump the minimum Seata Client version for Seata integration to 2.1.0 …
Browse files Browse the repository at this point in the history
…to serve nativeTest under GraalVM Native Image
  • Loading branch information
linghengqian committed Sep 27, 2024
1 parent 513a96f commit 1557ebb
Show file tree
Hide file tree
Showing 14 changed files with 1,193 additions and 99 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"condition":{"typeReachable":"org.apache.seata.config.ConfigurationCache"},
"interfaces":["org.apache.seata.config.Configuration"]
}
]

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -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":[]
}
29 changes: 2 additions & 27 deletions kernel/transaction/type/base/seata-at/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.seata</groupId>
<groupId>org.apache.seata</groupId>
<artifactId>seata-all</artifactId>
<version>${seata.version}</version>
<exclusions>
Expand Down Expand Up @@ -62,34 +62,9 @@
</dependency>

<dependency>
<groupId>io.seata</groupId>
<groupId>org.apache.seata</groupId>
<artifactId>seata-all</artifactId>
<version>${seata.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
</exclusion>
<exclusion>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun</groupId>
<artifactId>jconsole</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 1557ebb

Please sign in to comment.