I would think the correct way would be to do something like this

Connection conn = BasePeer.getConnection("myDatabase");
..... do all the DB stuff

BasePeer.commitTransaction(conn);

However I looked at the beta 4 code in CVS and the beginTransaction and
commitTransaction methods seem to have been shifted from BasePeer to a new
class called Transaction

Also the transaction doesn't seem to be working for beta 3. I tried doing a
rollback and though no exception was thrown while doing so, the data still
got entered in the database. Clarifications would be greatly appreciated.

Tanay



                                                                                       
                                                
                      tsjuday@checkfree                                                
                                                
                      .com                     To:       
[EMAIL PROTECTED]                                        
                                               cc:                                     
                                                
                      08/16/02 11:51 AM        Subject:  How to do a transaction       
                                                
                      Please respond to                                                
                                                
                      "Turbine Torque                                                  
                                                
                      Users List"                                                      
                                                
                                                                                       
                                                
                                                                                       
                                                




I'm trying to figure out how to use a transaction in Torque.  I saw a
Transaction class in the javadocs, but the methods had Java.sql.Connection
objects as parameters.  Is this just a back-end for another mechanism that
lets you do transactions?  I thought Torque was going to free me from using
these Connection objects, plus, I don't even have one of the objects
sitting around now that I'm using Torque to connect to the database.
What is the correct way to do a transaction in Torque?  Thanks!


Tobin Juday
Software Engineer
proud graduate of The Ohio State University
[EMAIL PROTECTED]
Phone: 614.564.4192
Pager: 877.546.0103

The #1 Way to Pay Online
http://www.checkfree.com/paybillsonline




--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>







--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to