Closed GoogleCodeExporter closed 9 years ago
Can be easily fixed with a flag to skip the execution of statements in case of
rollback.
Patch attached.
Original comment by eduardo.macarron
on 3 Jan 2011 at 9:39
fixed in r3553
Original comment by eduardo.macarron
on 3 Jan 2011 at 9:08
I try Release 3.0.5 , but I think it is not fixed.
BaseExecutor's rollback call flushStatements with false.
Is it to be flushStatements(required) ?
Original comment by ShinjiSa...@gmail.com
on 2 Jun 2011 at 7:52
Thanks for the notice. It seems wrong it should be flushStatements(true) on
rollback.
Original comment by eduardo.macarron
on 2 Jun 2011 at 8:12
fixed in r3781
Original comment by eduardo.macarron
on 3 Jun 2011 at 7:09
Issue 349 has been merged into this issue.
Original comment by eduardo.macarron
on 24 Jun 2011 at 3:27
This doesn't look to be fixed yet.
try {
sqlSession.delete("com.UserMapper.deleteFromStagingTable");
LOG.debug("Deleted Records ");
for (UserVO vo : UserList) {
sqlSession.insert("com.UserMapper.insertDataIntoStagingTable", vo);
}
LOG.debug("Inserted Records ");
throw new Exception("Error Occured while throwing ");
}catch(Exception ex){
LOG.debug("Error occured in UserDAOImpl.insertDataIntoStagingTable ",ex);
throw ex;
}finally {
}
Even after throwing the exception the rollback doesn't happen
Spring configs are as follows
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="SblMisDataSource"/>
<property name="rollbackOnCommitFailure" value="false" />
</bean>
<bean id="SblMisSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="SblMisDataSource" />
<property name="configLocation" value="classpath:com/config/mybatis-config.xml" />
</bean>
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg index="0" ref="SblMisSqlSessionFactory" />
<constructor-arg index="1" value="BATCH" />
</bean>
Original comment by itnav...@gmail.com
on 4 Aug 2011 at 1:23
Original comment by eduardo.macarron
on 3 Mar 2012 at 9:11
Original issue reported on code.google.com by
hpresnall@gmail.com
on 28 Nov 2010 at 4:24