ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris McMahon <cochran...@hotmail.com>
Subject RE: iBATIS Batching with Spring DAO
Date Wed, 05 Mar 2008 15:52:31 GMT
It's interesting that they use that as an example, because that wouldn't even really do a batch.
 In recent discussions, it was shown that iBATIS only batches the same statements.  "insertAccount"
and "insertAddress" would likely not be the same SQL statement, so they would each be in their
own batch.

Subject: RE: iBATIS Batching with Spring DAO
Date: Wed, 5 Mar 2008 08:41:19 -0700
From: Sundar.Sankaranarayanan@phoenix.edu
To: user-java@ibatis.apache.org

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 
Sent: Wednesday, March 05, 2008 8:19 
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 
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 

Shed those extra pounds with MSN and The Biggest Loser!
View raw message