emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

mybatis-spring should not let changing the executor type during a tx #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using?
mybatis-spring 1.0.0-RC1

Please describe the problem.  Unit tests are best!

If this two sentences are executed in the same transaction: 
sqlSessionTemplate.execute(oneCallback, ExecutorType.SIMPLE); 
sqlSessionTemplate.execute(oneCallback, ExecutorType.BATCH); 
The second one will always be executed with the first executor type 
because it will reuse the SqlSession. 

What is the expected output? What do you see instead?

Please provide any additional information below.

Already fixed by Hunter. Mybatis-spring throws an exception when the user tries 
to change the executor type.
Manual is also updated.

Original issue reported on code.google.com by eduardo.macarron on 24 Oct 2010 at 8:44

GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 1 Jan 2011 at 4:40