Skip to content

Commit de4dd4a

Browse files
authored
Merge pull request #13 from codingapi/dev
发布v4.0.2
2 parents 34b659a + e046a9c commit de4dd4a

18 files changed

Lines changed: 35 additions & 49 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.codingapi</groupId>
77
<artifactId>tx-lcn</artifactId>
8-
<version>4.0.2-SNAPSHOT</version>
8+
<version>4.0.2</version>
99
<packaging>pom</packaging>
1010

1111
<name>tx-lcn</name>

transaction-dubbo/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>com.codingapi</groupId>
99
<artifactId>transaction-dubbo</artifactId>
10-
<version>4.0.2-SNAPSHOT</version>
10+
<version>4.0.2</version>
1111

1212
<name>transaction-dubbo</name>
1313
<url>https://github.com/codingapi/tx-lcn</url>
@@ -68,7 +68,7 @@
6868
<dependency>
6969
<groupId>com.codingapi</groupId>
7070
<artifactId>tx-client</artifactId>
71-
<version>4.0.2-SNAPSHOT</version>
71+
<version>4.0.2</version>
7272
</dependency>
7373

7474
<dependency>

transaction-dubbo/src/main/java/com/codingapi/tx/dubbo/service/impl/TimeOutServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class TimeOutServiceImpl implements TimeOutService {
1919

2020
@Override
2121
public void loadOutTime(int timeOut) {
22-
int finalTimeOut = (null != providerConfig.getTimeout()) ? providerConfig.getTimeout() : timeOut;
22+
int finalTimeOut = (null != providerConfig.getTimeout()) ? providerConfig.getTimeout() : (timeOut * 1000);
2323
Constants.maxOutTime = finalTimeOut;
2424
}
2525
}

transaction-motan/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.codingapi</groupId>
88
<artifactId>transaction-motan</artifactId>
9-
<version>4.0.2-SNAPSHOT</version>
9+
<version>4.0.2</version>
1010

1111
<name>transaction-motan</name>
1212
<url>https://github.com/codingapi/tx-lcn</url>
@@ -66,7 +66,7 @@
6666
<dependency>
6767
<groupId>com.codingapi</groupId>
6868
<artifactId>tx-client</artifactId>
69-
<version>4.0.2-SNAPSHOT</version>
69+
<version>4.0.2</version>
7070
</dependency>
7171

7272
<!-- motan config start-->

transaction-motan/src/main/java/com/codingapi/tx/motan/service/impl/TimeOutServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class TimeOutServiceImpl implements TimeOutService {
2525
* @param timeOut timeOut
2626
*/
2727
public void loadOutTime(int timeOut) {
28-
int finalTimeOut = (null != basicServiceConfigBean.getRequestTimeout() ? basicServiceConfigBean.getRequestTimeout() : timeOut);
29-
Constants.maxOutTime = timeOut;
28+
int finalTimeOut = (null != basicServiceConfigBean.getRequestTimeout()) ? basicServiceConfigBean.getRequestTimeout() : (timeOut * 1000);
29+
Constants.maxOutTime = finalTimeOut;
3030
}
3131
}

transaction-springcloud/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.codingapi</groupId>
77
<artifactId>transaction-springcloud</artifactId>
8-
<version>4.0.2-SNAPSHOT</version>
8+
<version>4.0.2</version>
99

1010
<name>transaction-springcloud</name>
1111
<url>https://github.com/codingapi/tx-lcn</url>
@@ -69,7 +69,7 @@
6969
<dependency>
7070
<groupId>com.codingapi</groupId>
7171
<artifactId>tx-client</artifactId>
72-
<version>4.0.2-SNAPSHOT</version>
72+
<version>4.0.2</version>
7373
</dependency>
7474

7575
<dependency>

transaction-springcloud/src/main/java/com/codingapi/tx/springcloud/service/impl/TimeOutServiceImpl.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ public class TimeOutServiceImpl implements TimeOutService {
1313

1414
@Override
1515
public void loadOutTime(int timeOut) {
16-
//todo 暂时写死
17-
/*int timeOut = 20*1000;
18-
Constants.maxOutTime = timeOut;*/
1916
//从txManager取
20-
if(timeOut < 0){
17+
if(timeOut <= 0){
2118
Constants.maxOutTime = 20*1000;
2219
} else {
2320
Constants.maxOutTime = timeOut*1000;

tx-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.codingapi</groupId>
77
<artifactId>tx-client</artifactId>
8-
<version>4.0.2-SNAPSHOT</version>
8+
<version>4.0.2</version>
99

1010
<name>tx-client</name>
1111
<url>https://github.com/codingapi/tx-lcn</url>

tx-client/src/main/java/com/codingapi/tx/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public class Constants {
1717

1818

1919
/**
20-
* 最大模块超时时间
20+
* 最大模块超时时间(毫秒)
2121
*/
22-
public static int maxOutTime = 10;
22+
public static int maxOutTime = 10000;
2323

2424
/**
2525
* 模块唯一标示

tx-client/src/main/java/com/codingapi/tx/netty/service/impl/NettyServiceImpl.java

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class NettyServiceImpl implements NettyService {
3535

3636
@Autowired
3737
private NettyControlService nettyControlService;
38-
38+
3939
@Autowired
4040
private TimeOutService timeOutService;
4141

@@ -62,7 +62,7 @@ public synchronized void start() {
6262
int autoCompensateLimit = Constants.txServer.getAutoCompensateLimit();
6363

6464
final TransactionHandler transactionHandler = new TransactionHandler(nettyControlService, delay);
65-
65+
6666
timeOutService.loadOutTime(autoCompensateLimit);
6767
workerGroup = new NioEventLoopGroup();
6868
try {
@@ -102,16 +102,7 @@ public void run() {
102102
});
103103

104104
} catch (Exception e) {
105-
e.printStackTrace();
106-
107-
// isStarting = false;
108-
//
109-
// //断开重新连接机制
110-
// close();
111-
//
112-
// if (e instanceof ConnectTimeoutException) {
113-
// start();
114-
// }
105+
logger.error(e.getLocalizedMessage());
115106
}
116107
}
117108

@@ -126,11 +117,6 @@ public synchronized void close() {
126117
}
127118
}
128119

129-
//
130-
// @Override
131-
// public String sendMsg(Request request) {
132-
// return transactionHandler.sendMsg(request);
133-
// }
134120

135121
@Override
136122
public boolean checkState() {

0 commit comments

Comments
 (0)