简体   繁体   English

JTA交易超时

[英]JTA transaction timeout

If JTA transaction is configured or programmatically set a timeout value, when time reachs, should TransactionManager call rollback method on every XAResource which participate the tx? 如果已配置JTA事务或以编程方式设置了超时值,则当时间到了时,TransactionManager是否应在每个参与tx的XAResource上调用回滚方法? Or resource manager just rollback the transaction branch itself, since TXManager should has notified it thu XAResource.setTransactionTimeout? 还是资源管理器只是回滚事务分支本身,因为TXManager应该已经通过XAResource.setTransactionTimeout通知了它?

In other words, who should count the time and schedule the rollback, TransactionManager/ individual ResourceManager, or both? 换句话说,谁应该计算时间并计划回滚,TransactionManager /单独的ResourceManager或两者兼而有之?

Thanks! 谢谢!

A simple answer is the TransactionManager. 一个简单的答案是TransactionManager。 If you follow this link https://issues.jboss.org/browse/JBAS-2565 which says in JBOSS, 如果您点击此链接https://issues.jboss.org/browse/JBAS-2565 (在JBOSS中说),

if a timeout is associated with a transaction when a resource is enlisted, the same timeout is set on the XAResource. 如果在请求资源时超时与事务相关联,则在XAResource上设置相同的超时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM