[jboss-dev-forums] [Design of JBoss Transaction Services] - Thread safety and rollback
adrian@jboss.org
do-not-reply at jboss.com
Thu Dec 20 13:14:56 EST 2007
I know this is "invalid usage", but it still shouldn't lead to broken behaviour. :-)
See the test in jboss-4.2
| $ ./build.sh one-test -Dtest=org.jboss.test.tm.test.CompetingRollbackStressTestCase
|
This is stress test for a race condition (two threads invoking rollback
"at the same time"). I'm seeing the transaction synchronizations getting invoked twice.
| <testcase classname="org.jboss.test.tm.test.CompetingRollbackStressTestCase" name="testExecuteSQLDuringRollback" time="7.132">
| <error message="Synchronization invoked 2 times" type="org.jboss.test.util.ejb.RemoteTestException">java.lang.RuntimeException: Synchronization invoked 2 times
| at org.jboss.test.tm.test.CompetingRollbackStressTestCase$Main.test(CompetingRollbackStressTestCase.java:136)
| at org.jboss.test.tm.test.CompetingRollbackStressTestCase$TestRunnable.run(CompetingRollbackStressTestCase.java:193)
| at java.lang.Thread.run(Thread.java:595)
|
NOTE: This is a stress test, so you'll probably have to make it do
lots of iterations to reproduce the problem. e.g. start jboss with
| $ ./run.sh -Djbosstest.iterationcount=10000
|
and maybe run it a few times?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114750#4114750
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114750
More information about the jboss-dev-forums
mailing list