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.startBatch();
executor.update("insertAccount", account);
executor.update("insertAddress", account.getAddress());
executor.executeBatch();
}
});
}
}
-S
________________________________
From: Jesse Reimann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2008 8:19 AM
To: [email protected]
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?
Thanks,
Jesse Reimann