Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37e4945

Browse files
authored
Bugfix xa not throw (#72)
* public xa constructor* Adjust XaGlobalTransaction Excecute function signatures* throw XaGlobalTransaction ExecuteAsync Exception
1 parentfe25d97 commit37e4945

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

‎src/Dtmcli/Xa/Xa.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ public sealed class Xa : TransBase
1414
{
1515
privatereadonlyIDtmClient_dtmClient;
1616

17-
internalXa(IDtmClientdtmHttpClient,stringgid)
17+
publicXa(IDtmClientdtmHttpClient,stringgid)
1818
{
1919
this._dtmClient=dtmHttpClient;
2020
this.Gid=gid;
2121
this.TransType=DtmCommon.Constant.TYPE_XA;
2222
this.BranchIDGen=newBranchIDGen();
2323
}
2424

25-
internalXa(IDtmClientdtmHttpClient)
25+
publicXa(IDtmClientdtmHttpClient)
2626
{
2727
this._dtmClient=dtmHttpClient;
2828
}

‎src/Dtmcli/Xa/XaGlobalTransaction.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public XaGlobalTransaction(IDtmClient dtmClient, ILoggerFactory factory)
2020
publicasyncTask<string>ExcecuteAsync(Func<Xa,Task>xa_cb,CancellationTokencancellationToken=default)
2121
{
2222
vargid=await_dtmClient.GenGid(cancellationToken);
23-
awaitthis.Excecute(gid,xa_cb,cancellationToken);
23+
awaitthis.ExcecuteAsync(gid,xa_cb,cancellationToken);
2424
returngid;
2525
}
2626

27-
publicasyncTaskExcecute(stringgid,Func<Xa,Task>xa_cb,CancellationTokencancellationToken=default)
27+
publicasyncTaskExcecuteAsync(stringgid,Func<Xa,Task>xa_cb,CancellationTokencancellationToken=default)
2828
{
2929
awaitExcecuteAsync(gid,null,xa_cb,cancellationToken);
3030
}
@@ -46,6 +46,7 @@ public async Task ExcecuteAsync(string gid, Action<Xa> custom, Func<Xa, Task> xa
4646
xa.RollbackReason=ex.Message.Substring(0,ex.Message.Length>1023?1023:ex.Message.Length);
4747
_logger.LogError(ex,"prepare or submitting global transaction error");
4848
await_dtmClient.TransCallDtm(null,xa,Constant.Request.OPERATION_ABORT,cancellationToken);
49+
throw;
4950
}
5051
}
5152
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp