MyBatis: BE CAREFUL WHEN USING BATCH MODE FOR ACCESSING DATA BASES.
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 10 Apr 2016 12:06:34 +0000 (14:06 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Sun, 10 Apr 2016 12:06:34 +0000 (14:06 +0200)
commit2bc9ac76746774a594e96aa46e3d160de40d918b
tree0766daadb6449b851b8b2d86936750f4352bb21a
parent6b772ea038209c53ca2331d84c7176dd661c59d2
MyBatis: BE CAREFUL WHEN USING BATCH MODE FOR ACCESSING DATA BASES.

YOUR CODE MUST BE IMPLEMENTED FOR BATCH MODE. MANY TIMES SOME
CODE THAT WORKS WITH SIMPLE MODE WILL NOT WORK WITH BATCH MODE.

Abstractions (MyBatis) are cool but never forget how stuff works underneath.

I guess the same conclusion applies for JPA, Hibernater, etc, etc. Code working without
batch mode will not work with batch mode if you did not write your code for accessing
data base in batch mode.
MyBatis/MyBatis-Spring-ReuseBatchExecutor/src/main/java/de/example/mybatis/executor/ReuseBatchExecutor.java
MyBatis/MyBatis-Spring-ReuseBatchExecutor/src/main/java/de/example/mybatis/interceptor/ReuseBatchExecutorInterceptor.java
MyBatis/MyBatis-Spring-ReuseBatchExecutor/src/main/java/de/example/mybatis/spring/service/impl/ExampleServiceImpl.java
MyBatis/MyBatis-Spring-ReuseBatchExecutor/src/main/resources/config/mybatis-config.xml
MyBatis/MyBatis-Spring-ReuseBatchExecutor/src/main/resources/spring-config.xml