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

不支持选择指定的事务管理器。 #42

Open
xyzhimo opened this issue Dec 28, 2018 · 6 comments
Open

不支持选择指定的事务管理器。 #42

xyzhimo opened this issue Dec 28, 2018 · 6 comments

Comments

@xyzhimo
Copy link
Contributor

xyzhimo commented Dec 28, 2018

Spring的 @Transactional 当在配置文件中有多个 TransactionManager , 可以用该属性transactionManager 指定选择哪个事务管理器。而目前 @TxTransaction 还不支持指定某个事务管理器。我这边提个pr,你看看

@0000005
Copy link
Contributor

0000005 commented Dec 28, 2018

为什么会有这样的需求呢

@xyzhimo
Copy link
Contributor Author

xyzhimo commented Dec 28, 2018

我们现在工程就有多个事务管理器的存在,导致没有发生回滚。我们的工程项目是单工程多模块部署。

@0000005
Copy link
Contributor

0000005 commented Dec 28, 2018

如果是事务管理器集群导致的不能回滚,应该是解决这个bug,而不是指定事务管理器。

@xyzhimo
Copy link
Contributor Author

xyzhimo commented Dec 28, 2018

不,不是事务管理器集群问题,我在测试环境就单机部署,因为spring默认取的事务管理器是带有 @Primary 的事务管理器。

@xyzhimo
Copy link
Contributor Author

xyzhimo commented Dec 28, 2018

如果是事务管理器集群导致的不能回滚,应该是解决这个bug,而不是指定事务管理器。

一个项目工程中有多个数据库,多个数据源,就需要多个事务管理器啊。不是吗?

@0000005
Copy link
Contributor

0000005 commented Dec 28, 2018

我理解错了,我以为你说的是TxManager。

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