I have simple transactions working in beta 4.  Here is some simplified
sample code of mine:

       Connection conn = null;

       try {
            conn = Transaction.begin(OneOfMyTablesPeer.DATABASE_NAME);

            for (...)
            {
                 // do some stuff
                 try {
                    OneOfMyTablesPeer.doDelete(criteria, conn)
                 }
                 catch (TorqueException e) {
                        // rollback all deletes if one fails
                       Transaction.safeRollback(conn);
                       return;
                 }
            }

           Transaction.commit(conn);
        } catch (TorqueException e) {
            //do something
        }


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



                                                                                       
                                                
                      [EMAIL PROTECTED]                                                
                                                
                      om                       To:       "Turbine Torque Users List" 
<[EMAIL PROTECTED]>          
                                               cc:                                     
                                                
                      08/27/2002 01:40         Subject:  Re: Transaction               
                                                
                      PM                                                               
                                                
                      Please respond to                                                
                                                
                      "Turbine Torque                                                  
                                                
                      Users List"                                                      
                                                
                                                                                       
                                                
                                                                                       
                                                





Did transaction work for you in beta 4 ??
It still does not for me....

has anyone else tried any transaction related stuff with beta 4 ?

thanks




                      tsjuday@checkfree

                      .com                     To:       "Turbine Torque
Users List" <[EMAIL PROTECTED]>
                                               cc:

                      08/23/02 01:26 PM        Subject:  Re: Transaction

                      Please respond to

                      "Turbine Torque

                      Users List"








Hey, that did it!!!  Thank you.  I'll keep people posted if I hit other
issues.


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




                      Will Holcomb

                      <[EMAIL PROTECTED]        To:       Turbine Torque
Users List <[EMAIL PROTECTED]>
                      >                        cc:

                                               Subject:  Re: Transaction

                      08/23/2002 04:29

                      PM

                      Please respond to

                      "Turbine Torque

                      Users List"







On Fri, 23 Aug 2002 [EMAIL PROTECTED] wrote:

>             conn = Transaction.begin(DNISLookupTablePeer.DATABASE_NAME);
>             test1.save();
>             test2.save();
>             test3.save();
>             test4.save();
>             Transaction.rollback(conn);

Try saving using the connection and seeing how it goes (test1.save(conn)).

Will



--
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]>







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