-
15. Re: When transaction timeout, rollback didn't work as expected.
istudens Mar 23, 2012 10:17 AM (in response to mmusgrov)I've knocked up a simple test case in AS7 testsuite which calls an entity update, then waits for the reaper and then calls another entity update, always via bean interface. Both entity updates are rolled back, not only the first one. Even with a JMS message sending it works as expected.
See the code on my github branch:
https://github.com/istudens/jboss-as/compare/tx_reaper_test
Steps to reproduce:
1. git clone git@github.com:istudens/jboss-as.git
2. cd jboss-as
3. git checkout tx_reaper_test
4. ./build.sh clean install -DskipTests -Dts.noSmoke
5. ./integration-tests.sh verify -Dts.basic -Dts.noSmoke -Dtest=TransactionReaperTestCase
Cheers,
Ivo
-
16. Re: When transaction timeout, rollback didn't work as expected.
tomjenkinson Mar 23, 2012 10:20 AM (in response to istudens)Thanks Ivo, exactly what we needed
-
17. Re: When transaction timeout, rollback didn't work as expected.
redfoxlee Mar 25, 2012 8:59 AM (in response to mmusgrov)Would it be possible for you to include the AS log for this problem.
I wish i could, but these logs are from our customer, and at this moment exception log is only what i got...
Also is it feasible for you to test whether you get the same behaviour on one of the more recent versions of the app server.
I think this is a good idea and i would like to give it a try. But as you know the production env is not easy to change, even i got the result as expected we still have to do a lot of job to value it...and i'm afraid our customer may not wait that long. But still thank you!
-
18. Re: When transaction timeout, rollback didn't work as expected.
redfoxlee Mar 25, 2012 9:05 AM (in response to tomjenkinson)Tom Jenkinson 编写:
Ivo pointed me to this:
http://www.javahelp.info/2009/11/01/using-transactionattribute-in-submethods-on-same-ejb3-beans/
The salient point being:
The reason is that the @TransactionAttribute-annotations will only be honored, if you call the method via a business interface. So the first solutions is to inject the bean itself and call the submethod via the injected bean.
I have to re-iterate, this will only minimize the potential case of the transaction not being active
Thanks man!
I'm learning...........
-
19. Re: When transaction timeout, rollback didn't work as expected.
redfoxlee Mar 25, 2012 9:10 AM (in response to istudens)Ivo Studensky 编写:
I've knocked up a simple test case in AS7 testsuite which calls an entity update, then waits for the reaper and then calls another entity update, always via bean interface. Both entity updates are rolled back, not only the first one. Even with a JMS message sending it works as expected.
See the code on my github branch:
https://github.com/istudens/jboss-as/compare/tx_reaper_test
Steps to reproduce:
1. git clone git@github.com:istudens/jboss-as.git
2. cd jboss-as
3. git checkout tx_reaper_test
4. ./build.sh clean install -DskipTests -Dts.noSmoke
5. ./integration-tests.sh verify -Dts.basic -Dts.noSmoke -Dtest=TransactionReaperTestCase
Cheers,
Ivo
I appreciate it, thanks a lot Ivo~
I'll check it out a little bit later.