ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Poitras Christian <Christian.Poit...@ircm.qc.ca>
Subject RE: Beginner question on transactions...
Date Fri, 21 Nov 2008 18:12:19 GMT
Are your tables in InnoDB or MyISAM?

InnoDB tables are required in MySQL to support transactions.


-----Original Message-----
From: Comcast Mail [mailto:prabha_pady@comcast.net]
Sent: Friday, November 21, 2008 1:04 PM
To: user-java@ibatis.apache.org
Subject: Beginner question on transactions...


I have code that does the following:

try {
// loop and do some inserts
} catch ( Exception ex ) {
} finally {

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"/>



Any ideas. Help appreciated.


-- pady

View raw message