() {
@Override
public void initChannel(SocketChannel ch) {
@@ -166,10 +167,10 @@ public void initChannel(SocketChannel ch) {
});
try {
- this.serverBootstrap.bind(getListenPort()).sync();
+ this.serverBootstrap.bind(port).sync();
LOGGER.info("Server started, service listen port: {}", getListenPort());
InetSocketAddress address = new InetSocketAddress(XID.getIpAddress(), XID.getPort());
- for (RegistryService registryService : MultiRegistryFactory.getInstances()) {
+ for (RegistryService> registryService : MultiRegistryFactory.getInstances()) {
registryService.register(address);
}
initialized.set(true);
diff --git a/core/src/main/java/io/seata/core/rpc/netty/TmNettyRemotingClient.java b/core/src/main/java/io/seata/core/rpc/netty/TmNettyRemotingClient.java
index e2a238b61df..7c5ddf1af3b 100644
--- a/core/src/main/java/io/seata/core/rpc/netty/TmNettyRemotingClient.java
+++ b/core/src/main/java/io/seata/core/rpc/netty/TmNettyRemotingClient.java
@@ -20,7 +20,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;
-
import io.netty.channel.Channel;
import io.netty.util.concurrent.EventExecutorGroup;
import io.seata.common.DefaultValues;
@@ -57,7 +56,6 @@
* @author zhaojun
* @author zhangchenghui.dev@gmail.com
*/
-
public final class TmNettyRemotingClient extends AbstractNettyRemotingClient {
private static final Logger LOGGER = LoggerFactory.getLogger(TmNettyRemotingClient.class);
private static volatile TmNettyRemotingClient instance;
@@ -195,7 +193,7 @@ public void init() {
if (initialized.compareAndSet(false, true)) {
super.init();
if (io.seata.common.util.StringUtils.isNotBlank(transactionServiceGroup)) {
- getClientChannelManager().reconnect(transactionServiceGroup);
+ initConnection();
}
}
}
@@ -285,4 +283,9 @@ private String getExtraData() {
sb.append(RegisterTMRequest.UDATA_AUTH_VERSION).append(EXTRA_DATA_KV_CHAR).append(signer.getSignVersion()).append(EXTRA_DATA_SPLIT_CHAR);
return sb.toString();
}
+
+ private void initConnection() {
+ getClientChannelManager().reconnect(transactionServiceGroup);
+ }
+
}
diff --git a/core/src/main/java/io/seata/core/serializer/SerializerType.java b/core/src/main/java/io/seata/core/serializer/SerializerType.java
index b99653b8510..b5f468f9e7f 100644
--- a/core/src/main/java/io/seata/core/serializer/SerializerType.java
+++ b/core/src/main/java/io/seata/core/serializer/SerializerType.java
@@ -56,6 +56,12 @@ public enum SerializerType {
* Math.pow(2, 4)
*/
HESSIAN((byte)0x16),
+ /**
+ * The hessian.
+ *
+ * Math.pow(2, 5)
+ */
+ JACKSON((byte)0x32),
;
private final byte code;
diff --git a/core/src/main/java/io/seata/core/store/BranchTransactionDO.java b/core/src/main/java/io/seata/core/store/BranchTransactionDO.java
index e0fa63e876d..b14efcfb826 100644
--- a/core/src/main/java/io/seata/core/store/BranchTransactionDO.java
+++ b/core/src/main/java/io/seata/core/store/BranchTransactionDO.java
@@ -25,7 +25,9 @@
*
* @author zhangsen
*/
-public class BranchTransactionDO implements Comparable {
+public class BranchTransactionDO implements Comparable, java.io.Serializable {
+
+ private static final long serialVersionUID = -2108665795230590896L;
private String xid;
@@ -49,6 +51,13 @@ public class BranchTransactionDO implements Comparable {
private Date gmtModified;
+ public BranchTransactionDO(String xid, long branchId) {
+ this.xid = xid;
+ this.branchId = branchId;
+ }
+
+ public BranchTransactionDO() {}
+
/**
* Gets xid.
*
@@ -72,7 +81,7 @@ public void setXid(String xid) {
*
* @return the transaction id
*/
- public long getTransactionId() {
+ public Long getTransactionId() {
return transactionId;
}
@@ -90,7 +99,7 @@ public void setTransactionId(long transactionId) {
*
* @return the branch id
*/
- public long getBranchId() {
+ public Long getBranchId() {
return branchId;
}
@@ -162,7 +171,7 @@ public void setBranchType(String branchType) {
*
* @return the status
*/
- public int getStatus() {
+ public Integer getStatus() {
return status;
}
diff --git a/core/src/main/java/io/seata/core/store/GlobalTransactionDO.java b/core/src/main/java/io/seata/core/store/GlobalTransactionDO.java
index d94d2bca1f2..401a64da2f0 100644
--- a/core/src/main/java/io/seata/core/store/GlobalTransactionDO.java
+++ b/core/src/main/java/io/seata/core/store/GlobalTransactionDO.java
@@ -15,16 +15,17 @@
*/
package io.seata.core.store;
-import io.seata.common.util.StringUtils;
-
import java.util.Date;
+import io.seata.common.util.StringUtils;
/**
* Global Transaction data object
*
* @author zhangsen
*/
-public class GlobalTransactionDO {
+public class GlobalTransactionDO implements java.io.Serializable {
+
+ private static final long serialVersionUID = -6770955173129666389L;
private String xid;
@@ -48,6 +49,12 @@ public class GlobalTransactionDO {
private Date gmtModified;
+ public GlobalTransactionDO(String xid) {
+ this.xid = xid;
+ }
+
+ public GlobalTransactionDO() {}
+
/**
* Gets xid.
*
@@ -71,7 +78,7 @@ public void setXid(String xid) {
*
* @return the status
*/
- public int getStatus() {
+ public Integer getStatus() {
return status;
}
@@ -143,7 +150,7 @@ public void setTransactionName(String transactionName) {
*
* @return the timeout
*/
- public int getTimeout() {
+ public Integer getTimeout() {
return timeout;
}
@@ -161,7 +168,7 @@ public void setTimeout(int timeout) {
*
* @return the begin time
*/
- public long getBeginTime() {
+ public Long getBeginTime() {
return beginTime;
}
@@ -179,7 +186,7 @@ public void setBeginTime(long beginTime) {
*
* @return the transaction id
*/
- public long getTransactionId() {
+ public Long getTransactionId() {
return transactionId;
}
diff --git a/dependencies/pom.xml b/dependencies/pom.xml
index e40c967a2ef..4b3378be038 100644
--- a/dependencies/pom.xml
+++ b/dependencies/pom.xml
@@ -26,6 +26,7 @@
4.0.0
seata-dependencies
+
pom
Seata dependencies ${project.version}
@@ -46,7 +47,7 @@
1.0
0.11
3.5.9
- 2.9.1
+ 5.1.0
1.0.2
0.3.0
2.0.1
@@ -67,6 +68,7 @@
1.21
1.10.12
1.7.1
+ 1.3.13
4.1.86.Final
2.0
4.0.3
@@ -634,6 +636,11 @@