ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankaranarayanan" <Sundar.Sankaranaraya...@phoenix.edu>
Subject RE: iBATIS Batching with Spring DAO
Date Wed, 05 Mar 2008 15:41:19 GMT
Did u check Spring-reference.pdf. The batching of Ibatis has been
explained in page 296. 
public class SqlMapAccountDao extends SqlMapClientDaoSupport implements
AccountDao {

public void insertAccount(Account account) throws DataAccessException {

getSqlMapClientTemplate().execute(new SqlMapClientCallback() {

public Object doInSqlMapClient(SqlMapExecutor executor) throws
SQLException {


executor.update("insertAccount", account);

executor.update("insertAddress", account.getAddress());









From: Jesse Reimann [mailto:jreimann@ctigroup.com] 
Sent: Wednesday, March 05, 2008 8:19 AM
To: user-java@ibatis.apache.org
Subject: iBATIS Batching with Spring DAO

Could someone explain to me how-to do iBATIS batching when using Spring
DAO? I've been reading and searching and can't seem to find an example
out there on how to actually do it.

I'm using Abator to generate my Spring DAO classes and I've got it
working with no issues. I read that using Spring that you are
effectively setting the TransactionManager type to EXTERNAL so I also
setup a Spring Transaction Manager as discussed in this thread:
http://markmail.org/message/cjqctvogweyoykih . 


Has anyone else implemented batching in iBATIS with a similar setup and
can point me in the right direction?





Jesse Reimann



View raw message