batch insert and update user ibatis-spring

848 views
Skip to first unread message

c c

unread,
Nov 25, 2011, 11:45:43 PM11/25/11
to mybatis-user
now i use mybatis.spring to manger the sql session

my java class extends
org.mybatis.spring.support.SqlSessionDaoSupport;


and i get the sqlSession


but i look


the code {
@Autowired(required = false)
public final void setSqlSessionFactory(SqlSessionFactory
sqlSessionFactory) {
if (!this.externalSqlSession) {
this.sqlSession = new
SqlSessionTemplate(sqlSessionFactory);
}
}
}


and the new SqlSessionTemplate(sqlSessionFactory) base use

this(sqlSessionFactory,
sqlSessionFactory.getConfiguration().getDefaultExecutorType());


sqlSessionFactory.getConfiguration().getDefaultExecutorType() ==
ExecutorType.SIMPLE


how can i use ExecutorType. BATCH???


thks all


Eduardo

unread,
Nov 26, 2011, 11:46:22 AM11/26/11
to mybatis-user
Please, have a look at the manual. Search for the section
"SqlSessionTemplate"

c c

unread,
Dec 4, 2011, 7:50:09 AM12/4/11
to mybati...@googlegroups.com
can anyone give some example use batch insert or update

with ibatis3 ?thks

2011/11/27 Eduardo <eduardo....@gmail.com>

Eduardo

unread,
Dec 4, 2011, 8:53:39 AM12/4/11
to mybatis-user
http://mybatis.googlecode.com/svn/sub-projects/mybatis-spring/trunk/src/test/java/org/mybatis/spring/sample/

You have some info about this example in MyBatis-Spring manual (last
page).

On 4 dic, 13:50, c c <ele.test...@gmail.com> wrote:
> can anyone give some example use batch insert or update
>
> with ibatis3 ?thks
>

> 2011/11/27 Eduardo <eduardo.macar...@gmail.com>

Reply all
Reply to author
Forward
0 new messages