Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: saga remove spring #6017

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0bae661
1、解耦spring 2、去除saga-tm模块 3、优化部分接口声明
wt-better Nov 6, 2023
fec7ad7
fix ut
wt-better Nov 11, 2023
d807e56
优化rm模块
wt-better Nov 11, 2023
5005706
Merge remote-tracking branch 'origin/2.x' into feature/saga-remove-sp…
wt-better Nov 11, 2023
c42f243
add changes
wt-better Nov 11, 2023
0747b45
fix ut and add licence
wt-better Nov 13, 2023
7477a7c
Merge branch '2.x' into feature/saga-remove-spring
leizhiyuan Nov 13, 2023
d638467
pom xml add license
wt-better Nov 13, 2023
5510324
Merge branch 'feature/saga-remove-spring' of github.com:wt-better/sea…
wt-better Nov 13, 2023
1bdadc8
fix check stype
wt-better Nov 13, 2023
33e6491
serviceTask移动到base包,以serviceType类型区分
wt-better Nov 14, 2023
e9dfe83
优化代码 & format code
wt-better Nov 14, 2023
f409759
fix code style
wt-better Nov 14, 2023
6affce3
Merge branch '2.x' into feature/saga-remove-spring
wt-better Nov 14, 2023
a3d16ab
spring包只保留serviceTask的spring实现,基础的serviceTask声明和处理器作为基础定义移动到engine包
wt-better Nov 14, 2023
1c674cf
fix conflict
wt-better Nov 14, 2023
48d865e
fix checkstyle
wt-better Nov 14, 2023
9e68e35
UUIDSeqGenerator impl to native.uuid
wt-better Dec 25, 2023
e7ad159
Merge remote-tracking branch 'origin/2.x' into feature/saga-remove-sp…
wt-better Jan 15, 2024
929e04b
fix conflict and op code style
wt-better Jan 15, 2024
3ce399c
remove unuse import
wt-better Jan 15, 2024
1be5a27
fix licence
wt-better Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,12 @@
<groupId>io.seata</groupId>
<artifactId>seata-saga-engine</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>${project.groupId}</groupId>
<artifactId>seata-serializer-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.seata</groupId>
Expand All @@ -316,19 +322,8 @@
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-saga-tm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-saga-engine-store</artifactId>
<artifactId>seata-saga-spring</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>${project.groupId}</groupId>
<artifactId>seata-serializer-all</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- spring -->
Expand Down
7 changes: 1 addition & 6 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,7 @@
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-saga-tm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-saga-engine-store</artifactId>
<artifactId>seata-saga-spring</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions changes/en-us/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Seata is an easy-to-use, high-performance, open source distributed transaction s
The version is updated as follows:

### feature:
- [[#6017](https://github.com/seata/seata/pull/6017)] seata saga decouple spring, optimize architecture.
- [[#5165](https://github.com/seata/seata/pull/5165)] optimize TCC structure, supporting API access. add integration layer module(seata-integration-tx-api) for transaction process definition and proxy enhancement.
- [[#5352](https://github.com/seata/seata/pull/5352)] add jackson json parser and gson json parser for tcc business action context
- [[#5377](https://github.com/seata/seata/pull/5377)] make AbstractHttpExecutor.class support http put
Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
此版本更新如下:

### feature:
- [[#6017](https://github.com/seata/seata/pull/6017)] seata saga spring接耦、架构优化。
- [[#5165](https://github.com/seata/seata/pull/5165)] TCC结构拆分,支持API方式接入。增加集成层模块(seata-integration-tx-api),对事务流程定义以及代理部分增强。
- [[#5352](https://github.com/seata/seata/pull/5352)] 在TCC Business Action Context中集成jackson和gson序列化功能
- [[#5377](https://github.com/seata/seata/pull/5377)] 使AbstractHttpExecutor类支持PUT方式的请求
Expand Down
22 changes: 20 additions & 2 deletions common/src/main/java/io/seata/common/util/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
package io.seata.common.util;

import io.seata.common.Constants;
import io.seata.common.exception.ShouldNeverHappenException;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.lang.annotation.Annotation;
Expand All @@ -30,8 +32,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import io.seata.common.Constants;
import io.seata.common.exception.ShouldNeverHappenException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -400,6 +400,24 @@ public static boolean hasUpperCase(String str) {
return false;
}

public static boolean hasText(String str) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think hasText and containsText are redundant, as it completely identical to isNotBlank.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this named with history spring naming, for less change. It can also be changed to ‘ containsText’

return str != null && !str.isEmpty() && containsText(str);
}

public static boolean hasLength(CharSequence str) {
return str != null && str.length() > 0;
}

private static boolean containsText(CharSequence str) {
int strLen = str.length();
for (int i = 0; i < strLen; i++) {
if (!Character.isWhitespace(str.charAt(i))) {
return true;
}
}
return false;
}

public static String join(Iterator iterator, String separator) {
if (iterator == null) {
return null;
Expand Down
3 changes: 1 addition & 2 deletions saga/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
<module>seata-saga-statelang</module>
<module>seata-saga-engine</module>
<module>seata-saga-rm</module>
<module>seata-saga-tm</module>
<module>seata-saga-engine-store</module>
<module>seata-saga-spring</module>
</modules>

<dependencies>
Expand Down
55 changes: 0 additions & 55 deletions saga/seata-saga-engine-store/pom.xml

This file was deleted.

This file was deleted.

14 changes: 6 additions & 8 deletions saga/seata-saga-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<groupId>${project.groupId}</groupId>
<artifactId>seata-serializer-all</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<groupId>${project.groupId}</groupId>
<artifactId>seata-tm</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package io.seata.saga.engine;

import java.util.concurrent.ThreadPoolExecutor;

import io.seata.saga.engine.expression.ExpressionFactoryManager;
import io.seata.saga.engine.expression.ExpressionResolver;
import io.seata.saga.engine.invoker.ServiceInvokerManager;
Expand All @@ -28,13 +26,12 @@
import io.seata.saga.engine.store.StateLogStore;
import io.seata.saga.engine.strategy.StatusDecisionStrategy;
import io.seata.saga.proctrl.eventing.impl.ProcessCtrlEventPublisher;
import org.springframework.context.ApplicationContext;

import java.util.concurrent.ThreadPoolExecutor;
import javax.script.ScriptEngineManager;

/**
* StateMachineConfig
*
*/
public interface StateMachineConfig {

Expand Down Expand Up @@ -122,13 +119,6 @@ public interface StateMachineConfig {
*/
ProcessCtrlEventPublisher getAsyncProcessCtrlEventPublisher();

/**
* Gets get application context.
*
* @return the get application context
*/
ApplicationContext getApplicationContext();

/**
* Gets get thread pool executor.
*
Expand All @@ -152,12 +142,14 @@ public interface StateMachineConfig {

/**
* get trans operation timeout
*
* @return the transaction operate time out
*/
int getTransOperationTimeout();

/**
* get service invoke timeout
*
* @return the service invoke time out
*/
int getServiceInvokeTimeout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.seata.saga.rm;

import io.seata.saga.engine.StateMachineEngine;
package io.seata.saga.engine;

/**
*/
Expand All @@ -28,7 +26,7 @@ public static StateMachineEngine getStateMachineEngine() {
return stateMachineEngine;
}

public void setStateMachineEngine(StateMachineEngine smEngine) {
public static void setStateMachineEngine(StateMachineEngine smEngine) {
stateMachineEngine = smEngine;
}
}
Loading
Loading