Hi.
I have code that does the following:
try {
DaoManager.startTransaction();
// loop and do some inserts
...
DaoManager.commitTransaction();
} catch ( Exception ex ) {
...
} finally {
DaoManager.endTransaction();
}
One of the insert fails but the previous inserts have been committed.
Although the commitTransaction is never reached.
here is my transaction block from sqlmapconfig.xml ( pointing to mysql
database )...
<transactionManager type="JDBC" commitRequired="true">
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
<property name="JDBC.ConnectionURL" value="jdbc:mysql://localhost/test"/>
<property name="JDBC.Username" value="..."/>
<property name="JDBC.Password" value="..."/>
<property name="DefaultAutoCommit" value="false"/>
<property name="SetAutoCommitAllowed" value="false"/>
</dataSource>
</transactionManager>
Any ideas. Help appreciated.
Thanks
-- pady