From cb262efb85a843a46340b558ac1d60d2fd75544f Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 4 Feb 2024 19:14:14 +0800 Subject: [PATCH 1/3] optimize: compatible with integration.grpc API --- changes/en-us/2.x.md | 1 + changes/zh-cn/2.x.md | 1 + compatible/pom.xml | 5 +++++ .../client/ClientTransactionInterceptor.java | 22 +++++++++++++++++++ .../server/ServerTransactionInterceptor.java | 19 ++++++++++++++++ 5 files changed, 48 insertions(+) create mode 100644 compatible/src/main/java/io/seata/integration/grpc/interceptor/client/ClientTransactionInterceptor.java create mode 100644 compatible/src/main/java/io/seata/integration/grpc/interceptor/server/ServerTransactionInterceptor.java diff --git a/changes/en-us/2.x.md b/changes/en-us/2.x.md index 5c741aaae51..89444f606a1 100644 --- a/changes/en-us/2.x.md +++ b/changes/en-us/2.x.md @@ -81,6 +81,7 @@ Add changes here for all PR submitted to the 2.x branch. - [[#6301](https://github.com/apache/incubator-seata/pull/6301)] upgrade console frontend dependencies and supported nodejs versions - [[#6301](https://github.com/apache/incubator-seata/pull/6312)] add saga related io.seata compatible api - [[#6313](https://github.com/apache/incubator-seata/pull/6313)] console display the version number +- [[#6328](https://github.com/apache/incubator-seata/pull/6328)] compatible with integration.grpc ### security: diff --git a/changes/zh-cn/2.x.md b/changes/zh-cn/2.x.md index d915a242547..750187ece01 100644 --- a/changes/zh-cn/2.x.md +++ b/changes/zh-cn/2.x.md @@ -79,6 +79,7 @@ - [[#6301](https://github.com/apache/incubator-seata/pull/6301)] 升级console前端依赖及支持的nodejs版本 - [[#6301](https://github.com/apache/incubator-seata/pull/6312)] 添加saga相关的io.seata兼容性API - [[#6313](https://github.com/apache/incubator-seata/pull/6313)] console展示版本号 +- [[#6328](https://github.com/apache/incubator-seata/pull/6328)] 兼容 integration.grpc API ### security: diff --git a/compatible/pom.xml b/compatible/pom.xml index 8e2a25c09f6..7e1bc61c10c 100644 --- a/compatible/pom.xml +++ b/compatible/pom.xml @@ -49,5 +49,10 @@ 2.1.0-SNAPSHOT compile + + org.apache.seata + seata-grpc + ${project.version} + diff --git a/compatible/src/main/java/io/seata/integration/grpc/interceptor/client/ClientTransactionInterceptor.java b/compatible/src/main/java/io/seata/integration/grpc/interceptor/client/ClientTransactionInterceptor.java new file mode 100644 index 00000000000..8699b72796b --- /dev/null +++ b/compatible/src/main/java/io/seata/integration/grpc/interceptor/client/ClientTransactionInterceptor.java @@ -0,0 +1,22 @@ +/* + * 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 io.seata.integration.grpc.interceptor.client; + +public class ClientTransactionInterceptor + extends org.apache.seata.integration.grpc.interceptor.client.ClientTransactionInterceptor { + +} diff --git a/compatible/src/main/java/io/seata/integration/grpc/interceptor/server/ServerTransactionInterceptor.java b/compatible/src/main/java/io/seata/integration/grpc/interceptor/server/ServerTransactionInterceptor.java new file mode 100644 index 00000000000..21644d08969 --- /dev/null +++ b/compatible/src/main/java/io/seata/integration/grpc/interceptor/server/ServerTransactionInterceptor.java @@ -0,0 +1,19 @@ +/* + * 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 io.seata.integration.grpc.interceptor.server; + +public class ServerTransactionInterceptor extends org.apache.seata.integration.grpc.interceptor.server.ServerTransactionInterceptor{} From 9c663717880257b7b4f988bc009101fffda4e300 Mon Sep 17 00:00:00 2001 From: slievrly Date: Sun, 4 Feb 2024 22:18:26 +0800 Subject: [PATCH 2/3] optimize dependency --- compatible/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compatible/pom.xml b/compatible/pom.xml index 7e1bc61c10c..cbb8e43053e 100644 --- a/compatible/pom.xml +++ b/compatible/pom.xml @@ -54,5 +54,11 @@ seata-grpc ${project.version} + + io.grpc + grpc-stub + 1.27.1 + provided + From 105b64d53f93c2953ea65f6457061d1495b5cbae Mon Sep 17 00:00:00 2001 From: xingfudeshi Date: Thu, 15 Feb 2024 11:00:22 +0800 Subject: [PATCH 3/3] Update pom.xml --- compatible/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/compatible/pom.xml b/compatible/pom.xml index 359b79396d7..406d3e01d92 100644 --- a/compatible/pom.xml +++ b/compatible/pom.xml @@ -61,6 +61,7 @@ provided + org.apache.seata seata-rm-datasource 2.1.0-SNAPSHOT compile