ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Doing Batch Processing with IBatis from DAO Manager
Date Sat, 13 Aug 2005 14:54:31 GMT
If you're in the same transaction, and all of your DAOs are using the same 
database, there's no need to start more than one batch (and in fact it could 
be causing significant problems for you).

The batch control DAO is just a convenient, reusable DAO that provides 
access to the batch API from the SQL Mapping framework, or your own custom 
JDBC batching code.


On 8/13/05, Hycel Taylor <hycel1@gmail.com> wrote:
> Interesting. I'm not sure what, batchControlDao, is doing here.
> Currently, what I've just learned from others on this forum and what
> I'm currently doing is the following:
> daoManager.startTransaction();
> schoolDao.startBatch();
> majorDao.startBatch();
> courseDao.startBatch();
> ...
> // do work here.
> schoolDao.executeBatch();
> majorDao.executeBatch();
> courseDao.executeBatch();
> ...
> daoManager.commitTransaction();
> daoManager.endTransaction();
> This seems to be working. Although, when I am batching this way, an
> awful lot of locks are made on the database. This wasn't happening
> when I was doing strait JDBC. So, I'm not sure if I'm using your DAO
> API with batching properly.
> What do you suggest?

View raw message