ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Minjae Kim <con...@gmail.com>
Subject batchControlDAO
Date Thu, 22 Dec 2005 08:32:27 GMT
Dear folks,

I sought a little threads in this archive regarding to the batch job,
because there are many methods in my project to handle many tables at one
time.
I found some idea like the following code from the mailing list archive. But
if somebody can make the detailed sample code on batchControlDAO's
startBatch() and executeBatch() methods, please post it for me.

<Register.java>
// this method needs to handle 3 tables at one time
public boolean register() {
...
try {
   daoManager.startTransaction();
   batchControlDAO.startBatch();
   schoolDAO.doWork();
   majorDAO.doWork();
   courseDAO.doWork();
   batchControlDAO.executeBatch();
   daoManager.commitTransaction();
} finally {
   daoManager.endTransaction();
}
...
}

<schoolSqlMapDao.java>
// handling one table
public boolean insert() {
}

 <majorSqlMapDao.java>
// handling one table
public boolean insert() {
}

 <courseSqlMapDao.java>
// handling one table
public boolean insert() {
}

<batchControlDAO.java>
startBatch() {
}

excuteBatch() {
}

Thanks in advance,
Minjae Kim

Mime
View raw message