Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
You are most welcome. Thank you for helping me to understand the proper use of iBatis Dao. :-)

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
WOW. Sometimes it is amazing the kind of requirement people have. There is so much to learn and see. Thanks for taking your time replying. Prashanth Sukumaran. --- Hycel Taylor <[EMAIL PROTECTED]> wrote: > I forgot to put the daoManager.commit(), in my example. > > The business requireme

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
I forgot to put the daoManager.commit(), in my example. The business requirement: Actually, my code is a lot more complicated than the three dao's that I am using in my example. There are actually nine Dao's being used in this particular batch. I'm iterating over 500,000 records and I'm commit

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
Yah cool. You could do that. You would want to commit the transaction. Seeing the way you code i am sure you have considered this, but one question So all these must be under one transaction and in batch mode. So, even if one fails you want all to fail(not commit). Is that the business requi

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
I want to make sure I'm understanding how to use iBatis batching correctly. I understand now that SqlMapDaoTemplate, contains the method, startBatch() and execute batch. My Dao will extend SqlMapBaseDao which extends SqlMapDaoTemplate. So, since my Dao's are sharing the same daoManager, if I sta

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
Good Advice. Thanks.

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
Hi, But it is nothing. public class BaseSqlMapDao extends SqlMapDaoTemplate { protected static final int PAGE_SIZE = 4; public BaseSqlMapDao(DaoManager daoManager) { super(daoManager); } } you can directly use SqlMapDaoTemplate instead. I always follow a good habit of adding a bas

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
I see! This is what I needed to know. Thanks again!

RE: How do I do batch processing with IBatis DAO

2005-08-11 Thread Rafiq, Adnan
We just created a BaseSqlMapDao (extends SqlMapDaoTemplate) (similar to the petstore one) for our project. -Original Message- From: Hycel Taylor [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 11:21 AM To: user-java@ibatis.apache.org Subject: Re: How do I do batch processing

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
>From what I understand, looking at your source code, it appears that the batching is handled by, BaseSqlMapDao. As best I can tell, this is not a standard IBatis Class. It's package structure is the following: java.lang.Object com.ibatis.dao.client.template.DaoTemplate com.ibatis.dao.cl

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
Hi Hycel, I don't know if this will answer your question but i will try. My DAO is defined this way public class ShopSqlMapDao extends BaseSqlMapDao implements ShopDao Just like in the JPetStore application. When executing in batch mode i do this. try { startTransaction();

How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
Hi, I apologize, if this is the second time my email appears on the forum. I didn't see the first one show up after I posted it and this is my first time posting on this forum. Also, the first time I posted this email, there were '3D' characters all in my code example. I don't know how they got