forked from dromara/hmily
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1. Fix the error * 1. Initial Xa submission. 158 * 1. Implementation of the basic framework * 1. Basic definition. * 1. Dealt with xid * 1. 今天又完成了一部分..158. * I don’t have much time today, I just wrote a little bit * 1. Optimize part of the code. 158 * 1. The basic can be realized by xa. * 1. Adjust the code. * 1. 增加timer * 1. 日志相关的处理. * 1. 日志相关的处理. * 1. 准备处理,恢复日志.158 * 1. 增加XaRepository, * 1. 处理dubbo xa事务的实现逻辑.158 * 1. rpc 初长成. * 1. 准备修改mysql xa bug.158 * 1.测试部分处理一下.158 * 1. 处理与dubbo事务相关.158 * 1. 处理maven依赖.158 * 1. 处理xa同一个数据源的问题.158 * 1. 修复相关代码.158 * 1. 修复相关代码.158 * 1. checkstyle.158 Co-authored-by: sixh <[email protected]>
- Loading branch information
Showing
106 changed files
with
9,274 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
hmily-common/src/main/java/org/dromara/hmily/common/utils/NetUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.dromara.hmily.common.utils; | ||
|
||
import java.net.InetAddress; | ||
import java.net.UnknownHostException; | ||
|
||
/** | ||
* NetUtils . | ||
* | ||
* @author sixh chenbin | ||
*/ | ||
public class NetUtils { | ||
|
||
private static volatile String localAddress; | ||
|
||
/** | ||
* Gets local ip. | ||
* | ||
* @return the local ip | ||
*/ | ||
public static String getLocalIp() { | ||
if (localAddress == null) { | ||
synchronized (NetUtils.class) { | ||
if (localAddress == null) { | ||
try { | ||
localAddress = InetAddress.getLocalHost().getHostAddress(); | ||
} catch (UnknownHostException e) { | ||
localAddress = "0.0.0.0"; | ||
} | ||
} | ||
} | ||
} | ||
return localAddress; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
hmily-core/src/main/java/org/dromara/hmily/core/context/XaParticipant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.dromara.hmily.core.context; | ||
|
||
import lombok.Data; | ||
|
||
import javax.transaction.xa.XAResource; | ||
|
||
/** | ||
* XaParticipant . | ||
* 1、处理相关的参与者相关的数据Rpc的传传递. | ||
* | ||
* @author sixh chenbin | ||
*/ | ||
@Data | ||
public class XaParticipant { | ||
|
||
/** | ||
* 事务ID. | ||
*/ | ||
private String globalId; | ||
|
||
private String branchId; | ||
|
||
/** | ||
* flag. | ||
* @see XAResource | ||
*/ | ||
private int flag; | ||
|
||
private String cmd; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.