Hi:
Right, i didn't think that, but i was viewing the MySql Connector source code, 
and it actually do Nothing the Transaction finalizer (Dispose), i will use 
Using statement, but, probably is "Always"? :)If i call Abort() on the Gtk app, 
the services keep running but i lost the references or WS receipt some type of 
"Abort Signal" and really abort the operation? when i get the "WebException" 
Exception, it is already aborted and rolled back? (Rolled back of course, if i 
call the abort, and the Transaction wasn't commited already)
Thanks



> Date: Wed, 11 Jun 2008 17:24:46 +0200> From: [EMAIL PROTECTED]> To: [EMAIL 
> PROTECTED]> CC: mono-list@lists.ximian.com> Subject: Re: [Mono-list] Web 
> Services asynchronously> > Hi!> > Most probably the transaction will be 
> rolled back when myTran will be > finalized.> You should wrap myTrans, cmd, 
> cmd2, etc with "using" so as not to be > dependent on the finalizer.> > 
> Cheers!> Michał Ziemski> > Luciano _ pisze:> > Hi:> > I have a question about 
> the Web Services, and how it works on mono.> > > > I have a WebServices 
> (running in apache with mod_mono) that use > > MySqlConnector to connect 
> mysql server on the same machine. Within > > this WS i make some operations 
> (Insert's and update's) in a > > transaction operation.> >> > I'm consuming 
> this WS with a GtkSharp app, this app calls the WS > > asynchronously, with 
> CallBack.> > My Question is, if the services is aborted in the middle of the 
> > > transaction, the transaction will be rolled back? Or not? I test it, > > 
> and i think yes, but i need to know if always be rolled back, or maybe > > 
> sometimes no. My doubt is that maybe if the operation has terminated > > the 
> transaction but the services is not finished and services is > > aborted, the 
> services will be aborted but the transaction will be > > commited. Is the 
> connection (i use a Using statement) correctly disposed?> > > > The WS method 
> (pseudo-code) will be like this:> >> > [WebMethod()]> > public void 
> TestAsync()> > {> > using(MySqlConnection conn = new > > 
> MySqlConnection("....ConnectionString..."))> > {> > conn.Open();> > 
> MySqlTransaction myTran = conn.BeginTransaction();> > > > MySqlCommand cmd = 
> new mySqlCommand();> > cmd.Transaction = myTran;> > cmd.CommandText = "INSERT 
> INTO SOME TABLE;"> > cmd.ExecuteNonQuery();> > > > // If the abort call is in 
> this moment, the transaction > > is rolled back? The connection is correctly 
> disposed and closed?> > > > MySqlCommand cmd2 = new mySqlCommand();> > 
> cmd2.Transaction = myTran;> > cmd2.CommandText = "UPDATE SOME TABLE;"> > 
> cmd2.ExecuteNonQuery();> > > > // If the abort call is at this moment the 
> transaction is > > rolled back?> > myTran.Commit();> > > > // If the abort 
> call is at this moment the transaction is > > NOT rolled back?> > 
> conn.Close();> > }> > // The Using Statement is executing the Dispose method 
> if i call > > Abort() ?> > > > }> > > > > > Thanks a lot in advanced, i will 
> really appreciate help.> >> > Luciano> >> > 
> ------------------------------------------------------------------------> > 
> Stop squinting -- view your photos on your TV. Learn more > > 
> <http://www.microsoft.com/windows/digitallife/default.mspx?deepLink=photos> > 
> >> > 
> ------------------------------------------------------------------------> >> 
> > _______________________________________________> > Mono-list maillist - 
> Mono-list@lists.ximian.com> > 
> http://lists.ximian.com/mailman/listinfo/mono-list> > > > 
> _______________________________________________> Mono-list maillist - 
> Mono-list@lists.ximian.com> http://lists.ximian.com/mailman/listinfo/mono-list
_________________________________________________________________
Get your fix of news, sports, entertainment and more on MSN Mobile
http://www.msnmobilefix.com/Default.aspx
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to