db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dizzle <lacertosa_domen...@bah.com>
Subject Transactioning with MySQL
Date Wed, 07 Oct 2009 19:30:47 GMT

Can someone explain why my transaction is being committed on
loc.save(connection) when it should be rolled back?

Torque.init("Torque.properties");
java.sql.Connection connection =
org.apache.torque.util.Transaction.begin(Torque.getDefaultDB());
Location loc = new Location();
loc.setAltitude(BigDecimal.ONE);
loc.setLongitude(BigDecimal.ONE);
loc.setLatitude(BigDecimal.ONE);    
loc.save(connection);
org.apache.torque.util.Transaction.safeRollback(connection);

I'm using a MySQL db and I am able to successfully use torque with
everything other than Transactioning.

Any help would be appreciated.

- Dom
-- 
View this message in context: http://www.nabble.com/Transactioning-with-MySQL-tp25792863p25792863.html
Sent from the Apache DB - Torque Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message