I have a basic need of applying transactions.
What are my options to implement Transactions under this scenario..
My Objects (Just to give you my an understanding):
>>BaseDAO: Abstract IBatis DAO encapsulating Initialization of SqlMapClient and provides Insert/update/select methods...
>>TableDAOs: these DAOs are my DAOs which extend BaseDAO and provide methods to insert/update/select...by passing statement Id and parameterObject; Example EmployeeDAO deals with Employee tables in the database.
>>Service: these service objects abstract tableDAOs and create static TableDAO' for use in webapplication.
I am using these objects in struts/IBatis/Tomcat environment.
IBatis Transaction Manager Type is JDBC
Now I parse a huge file with 20 to 30 thousand records and perform inserts by calling service object which intern runs TableDAO. But every insert is either automatic transaction or start,commit and end have to be explicitly executed on the SQLMapClient..
Can i create startTransaction, endTransaction and CommitTransaction in BaseDAO as i have reference to static SqlMapClient there?
How do i begin transaction outside of actual executeInsert statement...?
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!