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

使用接口调用时无法触发AOP创建TCC事务 #33

Closed
liuyb02 opened this issue Sep 22, 2016 · 3 comments
Closed

使用接口调用时无法触发AOP创建TCC事务 #33

liuyb02 opened this issue Sep 22, 2016 · 3 comments

Comments

@liuyb02
Copy link

liuyb02 commented Sep 22, 2016

建议修改spring配置,增加对子类和接口方式调用时tcc的支持
<aop:aspectj-autoproxy proxy-target-class="true" />

@liuyb02 liuyb02 closed this as completed Sep 22, 2016
@liuyb02 liuyb02 reopened this Sep 22, 2016
@changmingxie
Copy link
Owner

@liuyb02 能举例说明下 期望的调用方式么?

@liuyb02
Copy link
Author

liuyb02 commented Sep 30, 2016

1、目前我的应用中所有都是通过接口调用,包括ROOT也是通过接口反射调用。我发现如果不加proxy-target-class就不能被compensable的aspect捕获到。我改后可以了。
2、另外confirm和cancel方法是不是也应该加compensable注解?我看你代码里provider的处理里有,如果不加没法propagationexist。
3、threadlocal存的transaction如果有嵌套调用或者同一线程两次调用时就会造成覆盖,我在自己代码里改成用stack,在操作进入和退出时通过入栈出栈的方法保存前一个transaction。
@changmingxie

@lovelivestyle1102
Copy link

@liuyb02 请问的嵌套事务是怎么做的。我现在嵌套出现很多异常,页出现部分业务调用俩次一些confirm又不调用的情况。

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

3 participants