diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/ServiceNameConstant.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/ServiceNameConstant.java
index da11cb17e..62e02ec15 100644
--- a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/ServiceNameConstant.java
+++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/ServiceNameConstant.java
@@ -34,4 +34,9 @@ public interface ServiceNameConstant {
* UMPS模块
*/
String UMPS_SERVICE = "pigx-upms";
+
+ /**
+ * 分布式事务协调服务
+ */
+ String TX_MANAGER = "pigx-tx-manager";
}
diff --git a/pigx-common/pigx-common-transaction/pom.xml b/pigx-common/pigx-common-transaction/pom.xml
index bb506510d..2bb04d9ef 100644
--- a/pigx-common/pigx-common-transaction/pom.xml
+++ b/pigx-common/pigx-common-transaction/pom.xml
@@ -15,16 +15,39 @@
pigx lcn transaction
+
+ com.pig4cloud
+ pigx-common-core
+ ${pigx.version}
+
com.codingapi
tx-client
${lcn.version}
+
+
+ org.slf4j
+ *
+
+
+
+
+ com.codingapi
+ tx-plugins-db
+ ${lcn.version}
+
+
+ org.slf4j
+ *
+
+
org.springframework.cloud
spring-cloud-starter-openfeign
+
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/TransactionConfiguration.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/TransactionConfiguration.java
similarity index 76%
rename from pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/TransactionConfiguration.java
rename to pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/TransactionConfiguration.java
index a10426935..176b8acd2 100755
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/TransactionConfiguration.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/TransactionConfiguration.java
@@ -15,23 +15,20 @@
* Author: lengleng (wangiegie@gmail.com)
*/
-package com.pig4cloud.pigx.common.transaction.tx;
+package com.pig4cloud.pigx.common.transaction;
-import com.pig4cloud.pigx.common.transaction.ribbon.loadbalancer.LcnRibbonConfiguration;
-import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
/**
- * Created by lorne on 2017/6/26.
+ *@author LCN on 2017/6/26.
*
* @author LCN
* @since 4.1.0
*/
@Configuration
-@ComponentScan
-@RibbonClients(defaultConfiguration = LcnRibbonConfiguration.class)
+@ComponentScan({"com.codingapi.tx", "com.pig4cloud.pigx.common.transaction"})
public class TransactionConfiguration {
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnNoOpLoadBalancerProxy.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/rewrite/TxManagerHttpRequestServiceImpl.java
old mode 100755
new mode 100644
similarity index 55%
rename from pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnNoOpLoadBalancerProxy.java
rename to pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/rewrite/TxManagerHttpRequestServiceImpl.java
index 643357b06..0c606db99
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnNoOpLoadBalancerProxy.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/rewrite/TxManagerHttpRequestServiceImpl.java
@@ -15,37 +15,33 @@
* Author: lengleng (wangiegie@gmail.com)
*/
-package com.pig4cloud.pigx.common.transaction.ribbon.loadbalancer;
+package com.pig4cloud.pigx.common.transaction.rewrite;
-import com.netflix.loadbalancer.NoOpLoadBalancer;
-import com.netflix.loadbalancer.Server;
+import com.codingapi.tx.netty.service.TxManagerHttpRequestService;
+import com.lorne.core.framework.utils.http.HttpUtils;
import lombok.extern.slf4j.Slf4j;
-
-import java.util.ArrayList;
-import java.util.List;
+import org.springframework.stereotype.Service;
/**
- * created by foxdd 2017-12-05
- *
- * @author LCN
- * @since 4.1.0
+ * @author lengleng
+ * @date 2018/8/19
+ * 请求tx-manager接口实现
*/
@Slf4j
-public class LcnNoOpLoadBalancerProxy extends NoOpLoadBalancer {
+@Service
+public class TxManagerHttpRequestServiceImpl implements TxManagerHttpRequestService {
- private LcnLoadBalancerRule lcnLoadBalancerRule = new LcnLoadBalancerRule();
-
- public LcnNoOpLoadBalancerProxy() {
- super();
+ @Override
+ public String httpGet(String url) {
+ String res = HttpUtils.get(url);
+ log.debug("请求接口 {},响应报文:{}", url, res);
+ return res;
}
@Override
- public Server chooseServer(Object key) {
- log.debug("enter chooseServer method, key:" + key);
-
- List serverList = new ArrayList();
- return lcnLoadBalancerRule.proxy(serverList, super.chooseServer(key));
-
+ public String httpPost(String url, String params) {
+ String res = HttpUtils.post(url, params);
+ log.debug("请求接口 {},响应报文:{}", url, res);
+ return res;
}
-
}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/rewrite/TxManagerTxUrlServiceImpl.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/rewrite/TxManagerTxUrlServiceImpl.java
new file mode 100644
index 000000000..2c423ced5
--- /dev/null
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/rewrite/TxManagerTxUrlServiceImpl.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.common.transaction.rewrite;
+
+import com.codingapi.tx.config.service.TxManagerTxUrlService;
+import com.pig4cloud.pigx.common.core.constant.ServiceNameConstant;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cloud.client.ServiceInstance;
+import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author lengleng
+ * @date 2018/8/19
+ * 使用服务发现重写 Txmanager 获取规则
+ */
+@Slf4j
+@Service
+@AllArgsConstructor
+public class TxManagerTxUrlServiceImpl implements TxManagerTxUrlService {
+ private final LoadBalancerClient loadBalancerClient;
+
+ @Override
+ public String getTxUrl() {
+ ServiceInstance serviceInstance = loadBalancerClient.choose(ServiceNameConstant.TX_MANAGER);
+ String host = serviceInstance.getHost();
+ Integer port = serviceInstance.getPort();
+ String url = String.format("http://%s:%s/tx/manager/", host, port);
+ log.info("tm.manager.url -> {}", url);
+ return url;
+ }
+}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnLoadBalancerRule.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnLoadBalancerRule.java
deleted file mode 100755
index ca3b329fc..000000000
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnLoadBalancerRule.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2018-2025, lengleng All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: lengleng (wangiegie@gmail.com)
- */
-
-package com.pig4cloud.pigx.common.transaction.ribbon;
-
-
-import com.codingapi.tx.aop.bean.TxTransactionLocal;
-import com.lorne.core.framework.utils.encode.MD5Util;
-import com.netflix.loadbalancer.Server;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.List;
-
-/**
- * created by foxdd 2017-12-05
- *
- * @author LCN
- * @since 4.1.0
- */
-@Slf4j
-public class LcnLoadBalancerRule {
-
- public Server proxy(List servers, Server server) {
-
- TxTransactionLocal txTransactionLocal = TxTransactionLocal.current();
- if (txTransactionLocal == null) {
- return server;
- }
-
- try {
- log.debug("LCNBalanceProxy - > start");
-
- String groupId = txTransactionLocal.getGroupId();
-
- //取出组件的appName
- String appName = server.getMetaInfo().getAppName();
-
-
- String key = MD5Util.md5((groupId + "_" + appName).getBytes());
-
- //如果只有一个可调用模块,则用当前的,且需要将数据记录到redis中
- if (servers.size() == 1) {
- putServer(key, txTransactionLocal, server);
- log.debug("LCNBalanceProxy -> only one server available");
- return server;
- }
-
- Server oldServer = getServer(txTransactionLocal, servers, key);
- if (oldServer != null) {
- log.debug("LCNBalanceProxy - > load old server ");
- return server;
- }
-
- putServer(key, txTransactionLocal, server);
- log.debug("LCNBalanceProxy - > load new server ");
-
- return server;
- } finally {
- log.debug("LCNBalanceProxy - > end");
- }
- }
-
-
- private void putServer(String key, TxTransactionLocal txTransactionLocal, Server server) {
- String serviceName = server.getMetaInfo().getAppName();
- String address = server.getHostPort();
-
- String md5 = MD5Util.md5((address + serviceName).getBytes());
-
- log.debug("putServer->address->" + address + ",md5-->" + md5);
-
- txTransactionLocal.putLoadBalance(key, md5);
- }
-
-
- private Server getServer(TxTransactionLocal txTransactionLocal, List servers, String key) {
- String val = txTransactionLocal.getLoadBalance(key);
- if (StringUtils.isEmpty(val)) {
- return null;
- }
- for (Server server : servers) {
- String serviceName = server.getMetaInfo().getAppName();
- String address = server.getHostPort();
-
- String md5 = MD5Util.md5((address + serviceName).getBytes());
-
- log.debug("getServer->address->" + address + ",md5-->" + md5);
-
- if (val.equals(md5)) {
- return server;
- }
- }
- return null;
- }
-
-}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnNoOpLoadBalancerProxy.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnNoOpLoadBalancerProxy.java
deleted file mode 100755
index 549a8e202..000000000
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnNoOpLoadBalancerProxy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2018-2025, lengleng All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: lengleng (wangiegie@gmail.com)
- */
-
-package com.pig4cloud.pigx.common.transaction.ribbon;
-
-import com.netflix.loadbalancer.NoOpLoadBalancer;
-import com.netflix.loadbalancer.Server;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * created by foxdd 2017-12-05
- *
- * @author LCN
- * @since 4.1.0
- */
-@Slf4j
-public class LcnNoOpLoadBalancerProxy extends NoOpLoadBalancer {
-
- private LcnLoadBalancerRule lcnLoadBalancerRule = new LcnLoadBalancerRule();
-
- public LcnNoOpLoadBalancerProxy() {
- super();
- }
-
- @Override
- public Server chooseServer(Object key) {
- log.debug("enter chooseServer method, key:" + key);
-
- List serverList = new ArrayList();
- return lcnLoadBalancerRule.proxy(serverList, super.chooseServer(key));
-
- }
-
-}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnRibbonConfiguration.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnRibbonConfiguration.java
deleted file mode 100755
index 1445f8b73..000000000
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnRibbonConfiguration.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2018-2025, lengleng All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: lengleng (wangiegie@gmail.com)
- */
-
-package com.pig4cloud.pigx.common.transaction.ribbon;
-
-import com.netflix.client.config.IClientConfig;
-import com.netflix.loadbalancer.*;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author LCN
- * @since 4.1.0
- */
-@Configuration
-public class LcnRibbonConfiguration {
-
- /**
- * 为ribbon的loadbalancer做代理,相比于重写IRULE,重写loadbalancer更有利于用户自选LB算法,而且有默认LB算法可用
- *
- * @param config
- * @param serverList
- * @param serverListFilter
- * @param rule
- * @param ping
- * @param serverListUpdater
- * @return
- */
- @Bean
- public ILoadBalancer ribbonLoadBalancer(IClientConfig config,
- ServerList serverList, ServerListFilter serverListFilter,
- IRule rule, IPing ping, ServerListUpdater serverListUpdater) {
- return new LcnZoneAwareLoadBalancerProxy(config, rule, ping, serverList,
- serverListFilter, serverListUpdater);
- }
-
-
-}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnZoneAwareLoadBalancerProxy.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnZoneAwareLoadBalancerProxy.java
deleted file mode 100755
index 2563d5270..000000000
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/LcnZoneAwareLoadBalancerProxy.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2025, lengleng All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: lengleng (wangiegie@gmail.com)
- */
-
-package com.pig4cloud.pigx.common.transaction.ribbon;
-
-import com.netflix.client.config.IClientConfig;
-import com.netflix.loadbalancer.*;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.List;
-
-/**
- * created by foxdd 2017-12-05
- *
- * @author LCN
- * @since 4.1.0
- */
-@Slf4j
-public class LcnZoneAwareLoadBalancerProxy extends ZoneAwareLoadBalancer {
-
- LcnLoadBalancerRule lcnLoadBalancerRule = new LcnLoadBalancerRule();
-
- public LcnZoneAwareLoadBalancerProxy(IClientConfig clientConfig, IRule rule,
- IPing ping, ServerList serverList, ServerListFilter filter,
- ServerListUpdater serverListUpdater) {
- super(clientConfig, rule, ping, serverList, filter, serverListUpdater);
- }
-
- @Override
- public Server chooseServer(Object key) {
- log.info("enter chooseServer method, key:" + key);
- //利用Dynamic负载类中的方法,可以在运行时更新服务实例清单
- List serverList;
- //获取处理之后的serverlist
- serverList = super.getServerListImpl().getUpdatedListOfServers();
- //获取过滤之后的serverlist
- serverList = super.getFilter().getFilteredListOfServers(serverList);
- if (null == serverList || serverList.isEmpty()) {
- return super.chooseServer(key);
- }
- return lcnLoadBalancerRule.proxy(serverList, super.chooseServer(key));
-
- }
-
-}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnLoadBalancerRule.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnLoadBalancerRule.java
deleted file mode 100755
index 594f04bad..000000000
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnLoadBalancerRule.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2018-2025, lengleng All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: lengleng (wangiegie@gmail.com)
- */
-
-package com.pig4cloud.pigx.common.transaction.ribbon.loadbalancer;
-
-
-import com.codingapi.tx.aop.bean.TxTransactionLocal;
-import com.lorne.core.framework.utils.encode.MD5Util;
-import com.netflix.loadbalancer.Server;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.List;
-
-/**
- * created by foxdd 2017-12-05
- *
- * @author LCN
- * @since 4.1.0
- */
-@Slf4j
-public class LcnLoadBalancerRule {
-
- public Server proxy(List servers, Server server) {
-
- TxTransactionLocal txTransactionLocal = TxTransactionLocal.current();
- if (txTransactionLocal == null) {
- return server;
- }
-
- try {
- log.debug("LCNBalanceProxy - > start");
-
- String groupId = txTransactionLocal.getGroupId();
-
- //取出组件的appName
- String appName = server.getMetaInfo().getAppName();
-
-
- String key = MD5Util.md5((groupId + "_" + appName).getBytes());
-
- //如果只有一个可调用模块,则用当前的,且需要将数据记录到redis中
- if (servers.size() == 1) {
- putServer(key, txTransactionLocal, server);
- log.debug("LCNBalanceProxy -> only one server available");
- return server;
- }
-
- Server oldServer = getServer(txTransactionLocal, servers, key);
- if (oldServer != null) {
- log.debug("LCNBalanceProxy - > load old server ");
- return server;
- }
-
- putServer(key, txTransactionLocal, server);
- log.debug("LCNBalanceProxy - > load new server ");
-
- return server;
- } finally {
- log.debug("LCNBalanceProxy - > end");
- }
- }
-
-
- private void putServer(String key, TxTransactionLocal txTransactionLocal, Server server) {
- String serviceName = server.getMetaInfo().getAppName();
- String address = server.getHostPort();
-
- String md5 = MD5Util.md5((address + serviceName).getBytes());
-
- log.debug("putServer->address->" + address + ",md5-->" + md5);
-
- txTransactionLocal.putLoadBalance(key, md5);
- }
-
-
- private Server getServer(TxTransactionLocal txTransactionLocal, List servers, String key) {
- String val = txTransactionLocal.getLoadBalance(key);
- if (StringUtils.isEmpty(val)) {
- return null;
- }
- for (Server server : servers) {
- String serviceName = server.getMetaInfo().getAppName();
- String address = server.getHostPort();
-
- String md5 = MD5Util.md5((address + serviceName).getBytes());
-
- log.debug("getServer->address->" + address + ",md5-->" + md5);
-
- if (val.equals(md5)) {
- return server;
- }
- }
- return null;
- }
-
-}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnRibbonConfiguration.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnRibbonConfiguration.java
deleted file mode 100755
index d0effe101..000000000
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnRibbonConfiguration.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2018-2025, lengleng All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: lengleng (wangiegie@gmail.com)
- */
-
-package com.pig4cloud.pigx.common.transaction.ribbon.loadbalancer;
-
-import com.netflix.client.config.IClientConfig;
-import com.netflix.loadbalancer.*;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author LCN
- * @since 4.1.0
- */
-@Configuration
-public class LcnRibbonConfiguration {
-
- /**
- * 为ribbon的loadbalancer做代理,相比于重写IRULE,重写loadbalancer更有利于用户自选LB算法,而且有默认LB算法可用
- *
- * @param config
- * @param serverList
- * @param serverListFilter
- * @param rule
- * @param ping
- * @param serverListUpdater
- * @return
- */
- @Bean
- public ILoadBalancer ribbonLoadBalancer(IClientConfig config,
- ServerList serverList, ServerListFilter serverListFilter,
- IRule rule, IPing ping, ServerListUpdater serverListUpdater) {
- return new LcnZoneAwareLoadBalancerProxy(config, rule, ping, serverList,
- serverListFilter, serverListUpdater);
- }
-
-
-}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnZoneAwareLoadBalancerProxy.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnZoneAwareLoadBalancerProxy.java
deleted file mode 100755
index cee16d10e..000000000
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/ribbon/loadbalancer/LcnZoneAwareLoadBalancerProxy.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2018-2025, lengleng All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * Neither the name of the pig4cloud.com developer nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * Author: lengleng (wangiegie@gmail.com)
- */
-
-package com.pig4cloud.pigx.common.transaction.ribbon.loadbalancer;
-
-import com.netflix.client.config.IClientConfig;
-import com.netflix.loadbalancer.*;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.List;
-
-/**
- * created by foxdd 2017-12-05
- *
- * @author LCN
- * @since 4.1.0
- */
-@Slf4j
-public class LcnZoneAwareLoadBalancerProxy extends ZoneAwareLoadBalancer {
-
- LcnLoadBalancerRule lcnLoadBalancerRule = new LcnLoadBalancerRule();
-
- public LcnZoneAwareLoadBalancerProxy(IClientConfig clientConfig, IRule rule,
- IPing ping, ServerList serverList, ServerListFilter filter,
- ServerListUpdater serverListUpdater) {
- super(clientConfig, rule, ping, serverList, filter, serverListUpdater);
- }
-
- @Override
- public Server chooseServer(Object key) {
- log.info("enter chooseServer method, key:" + key);
- //利用Dynamic负载类中的方法,可以在运行时更新服务实例清单
- List serverList;
- //获取处理之后的serverlist
- serverList = super.getServerListImpl().getUpdatedListOfServers();
- //获取过滤之后的serverlist
- serverList = super.getFilter().getFilteredListOfServers(serverList);
- if (null == serverList || serverList.isEmpty()) {
- return super.chooseServer(key);
- }
- return lcnLoadBalancerRule.proxy(serverList, super.chooseServer(key));
-
- }
-
-}
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/RequestInterceptorConfiguration.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/RequestInterceptorConfiguration.java
index c482d4c73..3ff0cbdc4 100755
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/RequestInterceptorConfiguration.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/RequestInterceptorConfiguration.java
@@ -23,7 +23,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
- * create by lorne on 2018/1/18
+ * @author LCN on 2018/1/18
*
* @author LCN
* @since 4.1.0
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/feign/TransactionRestTemplateInterceptor.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/feign/TransactionRestTemplateInterceptor.java
index a44a416cd..dfab8124b 100755
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/feign/TransactionRestTemplateInterceptor.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/feign/TransactionRestTemplateInterceptor.java
@@ -25,7 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Created by lorne on 2017/6/26.
+ *@author LCN on 2017/6/26.
*
* @author LCN
* @since 4.1.0
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/http/TransactionHttpRequestInterceptor.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/http/TransactionHttpRequestInterceptor.java
index 98b456698..f46bf6181 100755
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/http/TransactionHttpRequestInterceptor.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/http/TransactionHttpRequestInterceptor.java
@@ -27,7 +27,7 @@ import org.springframework.http.client.ClientHttpResponse;
import java.io.IOException;
/**
- * Created by lorne on 2017/7/3.
+ *@author LCN on 2017/7/3.
*
* @author LCN
* @since 4.1.0
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TransactionAspect.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TransactionAspect.java
index 2566bffd5..c7f19b95a 100755
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TransactionAspect.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TransactionAspect.java
@@ -27,7 +27,7 @@ import org.springframework.stereotype.Component;
/**
* LCN 事务拦截器
- * create by lorne on 2018/1/5
+ * @author LCN on 2018/1/5
*
* @author LCN
* @since 4.1.0
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TxManagerInterceptor.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TxManagerInterceptor.java
index 93b8b6d7e..bfae5a915 100755
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TxManagerInterceptor.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/interceptor/TxManagerInterceptor.java
@@ -28,7 +28,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
- * Created by lorne on 2017/6/7.
+ *@author LCN on 2017/6/7.
*
* @author LCN
* @since 4.1.0
diff --git a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/service/impl/ModelNameServiceImpl.java b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/service/impl/ModelNameServiceImpl.java
index 180f5fe0e..aa7dd6dd4 100755
--- a/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/service/impl/ModelNameServiceImpl.java
+++ b/pigx-common/pigx-common-transaction/src/main/java/com/pig4cloud/pigx/common/transaction/tx/springcloud/service/impl/ModelNameServiceImpl.java
@@ -29,7 +29,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
/**
- * Created by lorne on 2017/7/12.
+ *@author LCN on 2017/7/12.
*
* @author LCN
* @since 4.1.0
diff --git a/pigx-common/pigx-common-transaction/src/main/resources/META-INF/spring.factories b/pigx-common/pigx-common-transaction/src/main/resources/META-INF/spring.factories
index 9704185b3..7de3128b7 100644
--- a/pigx-common/pigx-common-transaction/src/main/resources/META-INF/spring.factories
+++ b/pigx-common/pigx-common-transaction/src/main/resources/META-INF/spring.factories
@@ -1 +1 @@
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.pig4cloud.pigx.common.transaction.tx.TransactionConfiguration
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.pig4cloud.pigx.common.transaction.TransactionConfiguration
diff --git a/pigx-upms/pigx-upms-biz/pom.xml b/pigx-upms/pigx-upms-biz/pom.xml
index 3916c99d9..e0a46eceb 100644
--- a/pigx-upms/pigx-upms-biz/pom.xml
+++ b/pigx-upms/pigx-upms-biz/pom.xml
@@ -102,6 +102,12 @@
org.springframework.boot
spring-boot-starter-undertow
+
+
+ com.pig4cloud
+ pigx-common-transaction
+ ${pigx.version}
+
diff --git a/pigx-visual/pigx-tx-manager/pom.xml b/pigx-visual/pigx-tx-manager/pom.xml
index 807c6194c..3217c9afd 100644
--- a/pigx-visual/pigx-tx-manager/pom.xml
+++ b/pigx-visual/pigx-tx-manager/pom.xml
@@ -33,6 +33,11 @@
org.springframework.boot
spring-boot-starter-undertow
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
+
org.springframework.cloud
@@ -56,11 +61,6 @@
netty-all
4.1.12.Final
-
-
- org.springframework.cloud
- spring-cloud-starter-netflix-eureka-client
-
com.pig4cloud
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/PigxTxManagerApplication.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/PigxTxManagerApplication.java
index 03001ec54..3734806b9 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/PigxTxManagerApplication.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/PigxTxManagerApplication.java
@@ -21,7 +21,11 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-
+/**
+ * @author LCN
+ * @author lengleng
+ * tx-manager ,进行了代码逻辑和代码规范重构
+ */
@SpringBootApplication
@EnableDiscoveryClient
public class PigxTxManagerApplication {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/AdminController.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/AdminController.java
index 51355d5c1..412f4684d 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/AdminController.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/AdminController.java
@@ -24,7 +24,7 @@ import com.pig4cloud.pigx.manager.compensate.model.TxModel;
import com.pig4cloud.pigx.manager.model.ModelInfo;
import com.pig4cloud.pigx.manager.model.ModelName;
import com.pig4cloud.pigx.manager.model.TxState;
-import org.springframework.beans.factory.annotation.Autowired;
+import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@@ -33,17 +33,17 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
- * Created by lorne on 2017/7/1.
+ *@author LCN on 2017/7/1.
+ *
+ * @author LCN
+ * @author lengleng
*/
@RestController
+@AllArgsConstructor
@RequestMapping("/admin")
public class AdminController {
-
- @Autowired
- private ApiAdminService apiAdminService;
-
- @Autowired
- private ApiModelService apiModelService;
+ private final ApiAdminService apiAdminService;
+ private final ApiModelService apiModelService;
@RequestMapping(value = "/onlines", method = RequestMethod.GET)
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/TxManagerController.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/TxManagerController.java
index 053872613..0dd42d2fe 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/TxManagerController.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/controller/TxManagerController.java
@@ -20,21 +20,22 @@ package com.pig4cloud.pigx.manager.api.controller;
import com.pig4cloud.pigx.manager.api.service.ApiTxManagerService;
import com.pig4cloud.pigx.manager.model.TxServer;
import com.pig4cloud.pigx.manager.model.TxState;
-import org.springframework.beans.factory.annotation.Autowired;
+import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
- * Created by lorne on 2017/7/1.
+ *@author LCN on 2017/7/1.
+ *
+ * @author LCN
+ * @author lengleng
*/
@RestController
+@AllArgsConstructor
@RequestMapping("/tx/manager")
public class TxManagerController {
-
- @Autowired
- private ApiTxManagerService apiTxManagerService;
-
+ private final ApiTxManagerService apiTxManagerService;
@RequestMapping("/getServer")
public TxServer getServer() {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiAdminService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiAdminService.java
index 367bf7346..ee6d74c12 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiAdminService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiAdminService.java
@@ -25,7 +25,8 @@ import com.pig4cloud.pigx.manager.model.TxState;
import java.util.List;
/**
- * create by lorne on 2017/11/12
+ * @author LCN on 2017/11/12
+ * @author LCN
*/
public interface ApiAdminService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiModelService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiModelService.java
index 1a226a835..876f86d3d 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiModelService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiModelService.java
@@ -22,7 +22,8 @@ import com.pig4cloud.pigx.manager.model.ModelInfo;
import java.util.List;
/**
- * create by lorne on 2017/11/13
+ * @author LCN on 2017/11/13
+ * @author LCN
*/
public interface ApiModelService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiTxManagerService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiTxManagerService.java
index 54fc8642e..6bd651da7 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiTxManagerService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/ApiTxManagerService.java
@@ -21,7 +21,7 @@ import com.pig4cloud.pigx.manager.model.TxServer;
import com.pig4cloud.pigx.manager.model.TxState;
/**
- * Created by lorne on 2017/7/1.
+ *@author LCN on 2017/7/1.
*/
public interface ApiTxManagerService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiAdminServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiAdminServiceImpl.java
index aeb0fbcc9..e99214ede 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiAdminServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiAdminServiceImpl.java
@@ -26,26 +26,23 @@ import com.pig4cloud.pigx.manager.manager.service.MicroService;
import com.pig4cloud.pigx.manager.model.ModelName;
import com.pig4cloud.pigx.manager.model.TxState;
import com.pig4cloud.pigx.manager.redis.RedisServerService;
-import org.springframework.beans.factory.annotation.Autowired;
+import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
/**
- * create by lorne on 2017/11/12
+ * @author LCN on 2017/11/12
+ *
+ * @author LCN
+ * @author lengleng
*/
@Service
+@AllArgsConstructor
public class ApiAdminServiceImpl implements ApiAdminService {
-
-
- @Autowired
- private MicroService eurekaService;
-
- @Autowired
- private RedisServerService redisServerService;
-
- @Autowired
- private CompensateService compensateService;
+ private final MicroService eurekaService;
+ private final RedisServerService redisServerService;
+ private final CompensateService compensateService;
@Override
public TxState getState() {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiModelServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiModelServiceImpl.java
index 631900dc3..f0ba20bc7 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiModelServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiModelServiceImpl.java
@@ -25,7 +25,8 @@ import org.springframework.stereotype.Service;
import java.util.List;
/**
- * create by lorne on 2017/11/13
+ * @author LCN on 2017/11/13
+ * @author LCN
*/
@Service
public class ApiModelServiceImpl implements ApiModelService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiTxManagerServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiTxManagerServiceImpl.java
index e908f25c4..5815d4d59 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiTxManagerServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/api/service/impl/ApiTxManagerServiceImpl.java
@@ -27,31 +27,28 @@ import com.pig4cloud.pigx.manager.manager.service.TxManagerSenderService;
import com.pig4cloud.pigx.manager.manager.service.TxManagerService;
import com.pig4cloud.pigx.manager.model.TxServer;
import com.pig4cloud.pigx.manager.model.TxState;
-import org.springframework.beans.factory.annotation.Autowired;
+import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
/**
- * Created by lorne on 2017/7/1.
+ *@author LCN on 2017/7/1.
+ *
+ * @author LCN
+ * @author lengleng
*/
@Service
+@AllArgsConstructor
public class ApiTxManagerServiceImpl implements ApiTxManagerService {
+ private final TxManagerService managerService;
- @Autowired
- private TxManagerService managerService;
+ private final MicroService eurekaService;
- @Autowired
- private MicroService eurekaService;
+ private final CompensateService compensateService;
- @Autowired
- private CompensateService compensateService;
+ private final TxManagerSenderService txManagerSenderService;
-
- @Autowired
- private TxManagerSenderService txManagerSenderService;
-
- @Autowired
- private ConfigReader configReader;
+ private final ConfigReader configReader;
@Override
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/CompensateDao.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/CompensateDao.java
index d0a84f019..60e58f9ca 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/CompensateDao.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/CompensateDao.java
@@ -22,7 +22,7 @@ import com.pig4cloud.pigx.manager.compensate.model.TransactionCompensateMsg;
import java.util.List;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
public interface CompensateDao {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/impl/CompensateDaoImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/impl/CompensateDaoImpl.java
index eb926f16c..60ce02c4f 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/impl/CompensateDaoImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/dao/impl/CompensateDaoImpl.java
@@ -30,7 +30,7 @@ import java.util.ArrayList;
import java.util.List;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service
public class CompensateDaoImpl implements CompensateDao {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TransactionCompensateMsg.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TransactionCompensateMsg.java
index 2c6865e04..84ff0c6d0 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TransactionCompensateMsg.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TransactionCompensateMsg.java
@@ -20,7 +20,7 @@ package com.pig4cloud.pigx.manager.compensate.model;
import com.pig4cloud.pigx.manager.netty.model.TxGroup;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
public class TransactionCompensateMsg {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TxModel.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TxModel.java
index aa0b26455..493174f53 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TxModel.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/model/TxModel.java
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.manager.compensate.model;
/**
- * create by lorne on 2017/11/12
+ * @author LCN on 2017/11/12
*/
public class TxModel {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/CompensateService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/CompensateService.java
index 4275c325b..8900f3bdd 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/CompensateService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/CompensateService.java
@@ -26,7 +26,7 @@ import com.pig4cloud.pigx.manager.netty.model.TxGroup;
import java.util.List;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
public interface CompensateService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/impl/CompensateServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/impl/CompensateServiceImpl.java
index b2f4f0cdf..0142309b8 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/impl/CompensateServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/compensate/service/impl/CompensateServiceImpl.java
@@ -47,12 +47,12 @@ import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service
public class CompensateServiceImpl implements CompensateService {
-
-
+ private static final String SUCCESS = "success";
+ private static final String SUCCESS1 = "SUCCESS";
private Logger logger = LoggerFactory.getLogger(CompensateServiceImpl.class);
@Autowired
@@ -109,7 +109,7 @@ public class CompensateServiceImpl implements CompensateService {
logger.error("Compensate Callback Result->" + res);
if (configReader.isCompensateAuto()) {
//自动补偿,是否自动执行补偿
- if (res.contains("success") || res.contains("SUCCESS")) {
+ if (res.contains(SUCCESS) || res.contains(SUCCESS1)) {
//自动补偿
autoCompensate(compensateKey, transactionCompensateMsg);
}
@@ -134,7 +134,7 @@ public class CompensateServiceImpl implements CompensateService {
boolean autoExecuteRes = false;
try {
int executeCount = 0;
- autoExecuteRes = _executeCompensate(json);
+ autoExecuteRes = executeCompensate_(json);
logger.info("Automatic Compensate Result->" + autoExecuteRes + ",json->" + json);
while (!autoExecuteRes) {
logger.info("Compensate Failure, Entering Compensate Queue->" + autoExecuteRes + ",json->" + json);
@@ -148,7 +148,7 @@ public class CompensateServiceImpl implements CompensateService {
} catch (InterruptedException e) {
e.printStackTrace();
}
- autoExecuteRes = _executeCompensate(json);
+ autoExecuteRes = executeCompensate_(json);
}
//执行成功删除数据
@@ -181,7 +181,7 @@ public class CompensateServiceImpl implements CompensateService {
public List loadModelList() {
List keys = compensateDao.loadCompensateKeys();
- Map models = new HashMap();
+ Map models = new HashMap<>(16);
for (String key : keys) {
if (key.length() > 36) {
@@ -296,6 +296,7 @@ public class CompensateServiceImpl implements CompensateService {
logger.info("Compensate Loaded->" + JSON.toJSONString(txGroup));
}
+ @Override
public TxGroup getCompensateByGroupId(String groupId) {
String json = compensateDao.getCompensateByGroupId(groupId);
if (json == null) {
@@ -315,7 +316,7 @@ public class CompensateServiceImpl implements CompensateService {
throw new ServiceException("no data existing");
}
- boolean hasOk = _executeCompensate(json);
+ boolean hasOk = executeCompensate_(json);
if (hasOk) {
// 删除本地补偿数据
compensateDao.deleteCompensateByPath(path);
@@ -326,7 +327,7 @@ public class CompensateServiceImpl implements CompensateService {
}
- private boolean _executeCompensate(String json) throws ServiceException {
+ private boolean executeCompensate_(String json) throws ServiceException {
JSONObject jsonObject = JSON.parseObject(json);
String model = jsonObject.getString("model");
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/ConfigReader.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/ConfigReader.java
index 31d54bae2..90ba04343 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/ConfigReader.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/ConfigReader.java
@@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Component
public class ConfigReader {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/CorsConfig.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/CorsConfig.java
index bdfd6edf9..d863d4415 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/CorsConfig.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/CorsConfig.java
@@ -24,7 +24,7 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
/**
- * create by lorne on 2017/8/17
+ * @author LCN on 2017/8/17
*/
@Configuration
public class CorsConfig {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/RestConfig.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/RestConfig.java
index ad682736f..a90d65484 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/RestConfig.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/config/RestConfig.java
@@ -23,7 +23,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
/**
- * Created by lorne on 2017/7/5.
+ *@author LCN on 2017/7/5.
*/
@Configuration
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/Constants.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/Constants.java
index 18430b709..21da813fb 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/Constants.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/Constants.java
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.manager.framework.utils;
/**
- * Created by lorne on 2017/6/8.
+ *@author LCN on 2017/6/8.
*/
public class Constants {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketManager.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketManager.java
index 1e7009546..d551dad40 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketManager.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketManager.java
@@ -25,7 +25,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
/**
- * Created by lorne on 2017/6/30.
+ *@author LCN on 2017/6/30.
*/
public class SocketManager {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketUtils.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketUtils.java
index a5156f8e0..6632ccfef 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketUtils.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/framework/utils/SocketUtils.java
@@ -24,7 +24,7 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.util.ReferenceCountUtil;
/**
- * Created by lorne on 2017/7/6.
+ *@author LCN on 2017/7/6.
*/
public class SocketUtils {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ApplicationStartListener.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ApplicationStartListener.java
index 96e4130b1..a054dd71e 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ApplicationStartListener.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ApplicationStartListener.java
@@ -26,7 +26,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
/**
- * create by lorne on 2017/8/7
+ * @author LCN on 2017/8/7
*/
@Component
public class ApplicationStartListener implements ApplicationListener {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ServerListener.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ServerListener.java
index 6382f8311..86d2e5b93 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ServerListener.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/ServerListener.java
@@ -27,7 +27,7 @@ import javax.servlet.ServletContextListener;
/**
- * Created by lorne on 2017/7/1.
+ *@author LCN on 2017/7/1.
*/
@Component
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/InitService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/InitService.java
index 7c84ca927..e7bf1981f 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/InitService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/InitService.java
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.manager.listener.service;
/**
- * Created by lorne on 2017/7/4.
+ *@author LCN on 2017/7/4.
*/
public interface InitService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/impl/InitServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/impl/InitServiceImpl.java
index 3301092a3..6c0f520a8 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/impl/InitServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/listener/service/impl/InitServiceImpl.java
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
/**
- * Created by lorne on 2017/7/4.
+ *@author LCN on 2017/7/4.
*/
@Service
public class InitServiceImpl implements InitService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/ModelInfoManager.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/ModelInfoManager.java
index 496c55bde..ed7cea3ee 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/ModelInfoManager.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/ModelInfoManager.java
@@ -23,7 +23,7 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
/**
- * create by lorne on 2017/11/13
+ * @author LCN on 2017/11/13
*/
public class ModelInfoManager {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/LoadBalanceService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/LoadBalanceService.java
index 3e862cf3a..85b86e479 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/LoadBalanceService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/LoadBalanceService.java
@@ -20,7 +20,7 @@ package com.pig4cloud.pigx.manager.manager.service;
import com.pig4cloud.pigx.manager.model.LoadBalanceInfo;
/**
- * create by lorne on 2017/12/5
+ * @author LCN on 2017/12/5
*/
public interface LoadBalanceService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/MicroService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/MicroService.java
index f7ec76c80..51f93e727 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/MicroService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/MicroService.java
@@ -21,11 +21,11 @@ import com.pig4cloud.pigx.manager.model.TxServer;
import com.pig4cloud.pigx.manager.model.TxState;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
public interface MicroService {
- String tmKey = "tx-manager";
+ String TMKEY = "tx-manager";
TxServer getServer();
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerSenderService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerSenderService.java
index 2373e2a1d..33de61355 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerSenderService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerSenderService.java
@@ -20,7 +20,7 @@ package com.pig4cloud.pigx.manager.manager.service;
import com.pig4cloud.pigx.manager.netty.model.TxGroup;
/**
- * Created by lorne on 2017/6/9.
+ *@author LCN on 2017/6/9.
*/
public interface TxManagerSenderService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerService.java
index 3b35df3f8..f44f2c828 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/TxManagerService.java
@@ -20,7 +20,7 @@ package com.pig4cloud.pigx.manager.manager.service;
import com.pig4cloud.pigx.manager.netty.model.TxGroup;
/**
- * Created by lorne on 2017/6/7.
+ *@author LCN on 2017/6/7.
*/
public interface TxManagerService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/LoadBalanceServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/LoadBalanceServiceImpl.java
index 0399c8faa..4adcadbaf 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/LoadBalanceServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/LoadBalanceServiceImpl.java
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
- * create by lorne on 2017/12/5
+ * @author LCN on 2017/12/5
*/
@Service
public class LoadBalanceServiceImpl implements LoadBalanceService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/MicroServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/MicroServiceImpl.java
index c32433c51..9514c1dae 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/MicroServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/MicroServiceImpl.java
@@ -36,7 +36,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service
public class MicroServiceImpl implements MicroService {
@@ -87,7 +87,7 @@ public class MicroServiceImpl implements MicroService {
private List getServices() {
List urls = new ArrayList<>();
- List serviceInstances = discoveryClient.getInstances(tmKey);
+ List serviceInstances = discoveryClient.getInstances(TMKEY);
for (ServiceInstance instanceInfo : serviceInstances) {
urls.add(instanceInfo.getUri().toASCIIString());
}
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerSenderServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerSenderServiceImpl.java
index 55177ff26..c2b781ab5 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerSenderServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerSenderServiceImpl.java
@@ -48,7 +48,7 @@ import java.util.concurrent.*;
/**
- * Created by lorne on 2017/6/9.
+ * @author LCN on 2017/6/9.
*/
@Service
public class TxManagerSenderServiceImpl implements TxManagerSenderService {
@@ -148,8 +148,8 @@ public class TxManagerSenderServiceImpl implements TxManagerSenderService {
final JSONObject jsonObject = new JSONObject();
jsonObject.put("a", "t");
-
- if (txGroup.getIsCompensate() == 1) { //补偿请求
+ //补偿请求
+ if (txGroup.getIsCompensate() == 1) {
jsonObject.put("c", txInfo.getIsCommit());
} else { //正常业务
jsonObject.put("c", checkSate);
@@ -246,21 +246,18 @@ public class TxManagerSenderServiceImpl implements TxManagerSenderService {
//创建Task
final Task task = ConditionUtils.getInstance().createTask(key);
- threadPool.execute(new Runnable() {
- @Override
- public void run() {
- while (!task.isAwait() && !Thread.currentThread().interrupted()) {
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
+ threadPool.execute(() -> {
+ while (!task.isAwait() && !Thread.interrupted()) {
+ try {
+ Thread.sleep(1);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
}
+ }
- Channel channel = SocketManager.getInstance().getChannelByModelName(model);
- if (channel != null && channel.isActive()) {
- SocketUtils.sendMsg(channel, msg);
- }
+ Channel channel = SocketManager.getInstance().getChannelByModelName(model);
+ if (channel != null && channel.isActive()) {
+ SocketUtils.sendMsg(channel, msg);
}
});
@@ -283,28 +280,20 @@ public class TxManagerSenderServiceImpl implements TxManagerSenderService {
private void threadAwaitSend(final Task task, final TxInfo txInfo, final String msg) {
- threadPool.execute(new Runnable() {
- @Override
- public void run() {
- while (!task.isAwait() && !Thread.currentThread().interrupted()) {
- try {
- Thread.sleep(1);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
+ threadPool.execute(() -> {
+ while (!task.isAwait() && !Thread.interrupted()) {
+ try {
+ Thread.sleep(1);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
}
+ }
- if (txInfo != null && txInfo.getChannel() != null) {
- txInfo.getChannel().send(msg, task);
- } else {
- task.setBack(new IBack() {
- @Override
- public Object doing(Object... objs) throws Throwable {
- return "-2";
- }
- });
- task.signalTask();
- }
+ if (txInfo != null && txInfo.getChannel() != null) {
+ txInfo.getChannel().send(msg, task);
+ } else {
+ task.setBack(objs -> "-2");
+ task.signalTask();
}
});
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerServiceImpl.java
index f943fcd02..76ecc6743 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/manager/service/impl/TxManagerServiceImpl.java
@@ -35,7 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
- * Created by lorne on 2017/6/7.
+ *@author LCN on 2017/6/7.
*/
@Service
public class TxManagerServiceImpl implements TxManagerService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ChannelSender.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ChannelSender.java
index 489d39bc2..476f4c57e 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ChannelSender.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ChannelSender.java
@@ -25,7 +25,7 @@ import io.netty.channel.Channel;
import org.apache.commons.lang.StringUtils;
/**
- * create by lorne on 2017/8/7
+ * @author LCN on 2017/8/7
*/
public class ChannelSender {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/LoadBalanceInfo.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/LoadBalanceInfo.java
index 5c47d38c9..750447d6e 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/LoadBalanceInfo.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/LoadBalanceInfo.java
@@ -19,7 +19,7 @@ package com.pig4cloud.pigx.manager.model;
/**
* 负载均衡模块信息
- * create by lorne on 2017/12/5
+ * @author LCN on 2017/12/5
*/
public class LoadBalanceInfo {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelInfo.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelInfo.java
index 0f1cca193..96a9b0366 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelInfo.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelInfo.java
@@ -19,7 +19,7 @@ package com.pig4cloud.pigx.manager.model;
/**
* 模块信息
- * create by lorne on 2017/11/13
+ * @author LCN on 2017/11/13
*/
public class ModelInfo {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelName.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelName.java
index 1d51694ed..443815cc6 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelName.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/ModelName.java
@@ -20,7 +20,7 @@
package com.pig4cloud.pigx.manager.model;
/**
- * create by lorne on 2017/11/22
+ * @author LCN on 2017/11/22
*/
public class ModelName {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxServer.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxServer.java
index 7c6c19251..9effb9f63 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxServer.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxServer.java
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.manager.model;
/**
- * Created by lorne on 2017/7/1.
+ *@author LCN on 2017/7/1.
*/
public class TxServer {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxState.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxState.java
index bf65e3830..978f035a5 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxState.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/model/TxState.java
@@ -20,7 +20,7 @@ package com.pig4cloud.pigx.manager.model;
import java.util.List;
/**
- * Created by lorne on 2017/7/1.
+ *@author LCN on 2017/7/1.
*/
public class TxState {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/handler/TxCoreServerHandler.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/handler/TxCoreServerHandler.java
index 70116a5a9..64b4e0dff 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/handler/TxCoreServerHandler.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/handler/TxCoreServerHandler.java
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.manager.netty.handler;
/**
- * Created by lorne on 2017/6/29.
+ * @author LCN on 2017/6/29.
*/
import com.alibaba.fastjson.JSONObject;
@@ -40,6 +40,8 @@ import java.util.concurrent.Executor;
/**
* Handles a server-side channel.
+ *
+ * @author lengleng
*/
@ChannelHandler.Sharable
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxGroup.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxGroup.java
index 739d963e7..cec5f5766 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxGroup.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxGroup.java
@@ -25,7 +25,7 @@ import java.util.ArrayList;
import java.util.List;
/**
- * Created by lorne on 2017/6/7.
+ *@author LCN on 2017/6/7.
*/
public class TxGroup {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxInfo.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxInfo.java
index 89bac0b06..ac144128d 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxInfo.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/model/TxInfo.java
@@ -22,7 +22,7 @@ import com.lorne.core.framework.model.JsonModel;
import com.pig4cloud.pigx.manager.model.ChannelSender;
/**
- * Created by lorne on 2017/6/7.
+ *@author LCN on 2017/6/7.
*/
public class TxInfo extends JsonModel {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/IActionService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/IActionService.java
index d8ab1b191..8cf41a60c 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/IActionService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/IActionService.java
@@ -20,7 +20,7 @@ package com.pig4cloud.pigx.manager.netty.service;
import com.alibaba.fastjson.JSONObject;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
public interface IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyServerService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyServerService.java
index 92c5f183a..c3a99389e 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyServerService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyServerService.java
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.manager.netty.service;
/**
- * Created by lorne on 2017/6/30.
+ *@author LCN on 2017/6/30.
*/
public interface NettyServerService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyService.java
index 4d7f774ae..7f78193a7 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/NettyService.java
@@ -18,7 +18,7 @@
package com.pig4cloud.pigx.manager.netty.service;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
public interface NettyService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionATGServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionATGServiceImpl.java
index 6347e9df9..f8cb230d3 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionATGServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionATGServiceImpl.java
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
/**
* 添加事务组
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "atg")
public class ActionATGServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCGServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCGServiceImpl.java
index e3e61a5c3..1c796842b 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCGServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCGServiceImpl.java
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
/**
* 创建事务组
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "cg")
public class ActionCGServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCKGServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCKGServiceImpl.java
index 1aebad576..8fc6e2f2e 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCKGServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCKGServiceImpl.java
@@ -25,7 +25,7 @@ import org.springframework.stereotype.Service;
/**
* 检查事务组
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "ckg")
public class ActionCKGServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCServiceImpl.java
index 1609e251c..e920c8baf 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCServiceImpl.java
@@ -22,7 +22,7 @@ import org.springframework.stereotype.Service;
/**
* 补偿回调
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "c")
public class ActionCServiceImpl extends BaseSignalTaskService implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCTGServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCTGServiceImpl.java
index 3d2a92b45..5d545ebe6 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCTGServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionCTGServiceImpl.java
@@ -25,7 +25,7 @@ import org.springframework.stereotype.Service;
/**
* 关闭事务组
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "ctg")
public class ActionCTGServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionGLBServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionGLBServiceImpl.java
index 9f76e028b..f772b53b2 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionGLBServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionGLBServiceImpl.java
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
/**
* 获取负载模块信息
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "glb")
public class ActionGLBServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionHServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionHServiceImpl.java
index f95ea832e..aa234b345 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionHServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionHServiceImpl.java
@@ -25,7 +25,7 @@ import org.springframework.stereotype.Service;
/**
* 心跳包
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "h")
public class ActionHServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionPLBServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionPLBServiceImpl.java
index b66052876..ea86b49da 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionPLBServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionPLBServiceImpl.java
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
/**
* 添加负载模块信息
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "plb")
public class ActionPLBServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionRGServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionRGServiceImpl.java
index 5b9f394e1..c3d63b4b0 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionRGServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionRGServiceImpl.java
@@ -25,7 +25,7 @@ import org.springframework.stereotype.Service;
/**
* 强制回滚事务组
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "rg")
public class ActionRGServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionTServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionTServiceImpl.java
index c0da6b732..d8d93079b 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionTServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionTServiceImpl.java
@@ -22,7 +22,7 @@ import org.springframework.stereotype.Service;
/**
* 通知事务回调
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "t")
public class ActionTServiceImpl extends BaseSignalTaskService implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionUMIServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionUMIServiceImpl.java
index 94a36c667..b9f414411 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionUMIServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/ActionUMIServiceImpl.java
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
/**
* 上传模块信息
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service(value = "umi")
public class ActionUMIServiceImpl implements IActionService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/BaseSignalTaskService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/BaseSignalTaskService.java
index 166f129e9..56237aeb1 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/BaseSignalTaskService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/BaseSignalTaskService.java
@@ -23,7 +23,7 @@ import com.lorne.core.framework.utils.task.IBack;
import com.lorne.core.framework.utils.task.Task;
/**
- * create by lorne on 2017/11/13
+ * @author LCN on 2017/11/13
*/
public class BaseSignalTaskService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServerServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServerServiceImpl.java
index a579139e3..49e02ee87 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServerServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServerServiceImpl.java
@@ -45,7 +45,7 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
/**
- * Created by lorne on 2017/6/30.
+ *@author LCN on 2017/6/30.
*/
@Service
public class NettyServerServiceImpl implements NettyServerService, DisposableBean {
@@ -71,7 +71,7 @@ public class NettyServerServiceImpl implements NettyServerService, DisposableBea
public void start() {
final int heartTime = configReader.getTransactionNettyHeartTime() + 10;
txCoreServerHandler = new TxCoreServerHandler(threadPool, nettyService);
- bossGroup = new NioEventLoopGroup(50); // (1)
+ bossGroup = new NioEventLoopGroup(50);
workerGroup = new NioEventLoopGroup();
try {
ServerBootstrap b = new ServerBootstrap();
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServiceImpl.java
index a5359757c..3382aca33 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/netty/service/impl/NettyServiceImpl.java
@@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service
public class NettyServiceImpl implements NettyService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/RedisServerService.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/RedisServerService.java
index ce12a030c..d4d8e6384 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/RedisServerService.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/RedisServerService.java
@@ -23,7 +23,7 @@ import com.pig4cloud.pigx.manager.netty.model.TxGroup;
import java.util.List;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
public interface RedisServerService {
diff --git a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/impl/RedisServerServiceImpl.java b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/impl/RedisServerServiceImpl.java
index 8621a08d4..9cd1cc83b 100644
--- a/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/impl/RedisServerServiceImpl.java
+++ b/pigx-visual/pigx-tx-manager/src/main/java/com/pig4cloud/pigx/manager/redis/impl/RedisServerServiceImpl.java
@@ -35,7 +35,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
- * create by lorne on 2017/11/11
+ * @author LCN on 2017/11/11
*/
@Service
public class RedisServerServiceImpl implements RedisServerService {