Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

全局事务id怎么获取? #327

Open
Masquerade6 opened this issue Jan 16, 2022 · 1 comment
Open

全局事务id怎么获取? #327

Masquerade6 opened this issue Jan 16, 2022 · 1 comment

Comments

@Masquerade6
Copy link

Long transId = HmilyContextHolder.get().getTransId();
Long transId = HmilyTransactionHolder.getInstance().getCurrentTransaction().getTransId();

只有在事务发起方才能得到事务id,其它地方调用HmilyContextHolder.get()和HmilyTransactionHolder.getInstance().getCurrentTransaction()拿到的都是null?这是bug还是使用不对?

@clclo121
Copy link

clclo121 commented Sep 1, 2023

存在threadLocal中的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants