Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2007

Tip: Looking for answers? Try searching our database.

When to use System.Transactions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill Smith - 05 Jan 2007 05:53 GMT
Hi,

I have been reading through a lot of material online trying to figure out if
my current scenario warrants the use of transactions. I have a ASP.NET 2.0
site that performs a task consisting of two LDAP operations, a filesystem
operation and a database operation. If any of them fail they should roll
back. Currently I'm just doing this with basic logic, however I'm wondering
if I should try using the new system.transactions? I'm concerned though as
only one of the above operation actual supports transactions.

Thanks in advanced.
Bill
Mary Chipman [MSFT] - 05 Jan 2007 16:27 GMT
If one of the resources doesn't support transactions, then no,
System.Transactions isn't an option. You can get more information on
transactions in this topic:
http://msdn2.microsoft.com/en-us/library/0abf6ykb.aspx

--Mary

>Hi,
>
[quoted text clipped - 8 lines]
>Thanks in advanced.
>Bill
Oliver Sturm - 05 Jan 2007 18:29 GMT
Hello Bill,

>Currently I'm just doing this with basic logic, however I'm wondering
>if I should try using the new system.transactions? I'm concerned though as
>only one of the above operation actual supports transactions.

One of the great things about System.Transactions is that it's an
extensible system. So you could, theoretically, create appropriate
rollback code yourself for those parts of the operation that don't support
transactions themselves, and use the System.Transactions infrastructure as
a very clean way of interfacing with the combined handling.

Of course it has to be said that it can be very difficult and/or
comparatively inefficient to create a transaction-enabled layer around a
subsystem that doesn't have any support for this itself, so you should
probably make sure you

               Oliver Sturm
Signature

http://www.sturmnet.org/blog

Oliver Sturm - 05 Jan 2007 18:33 GMT
[ I actually managed to send my previous post before it was finished, so
please disregard in favor of this second, complete, try. ]

Hello Bill,

>Currently I'm just doing this with basic logic, however I'm wondering
>if I should try using the new system.transactions? I'm concerned though as
>only one of the above operation actual supports transactions.

One of the great things about System.Transactions is that it's an
extensible system. So you could, theoretically, create appropriate
rollback code yourself for those parts of the operation that don't support
transactions themselves, and use the System.Transactions infrastructure as
a very clean way of interfacing with the combined handling.

Of course it has to be said that it can be very difficult and/or
comparatively inefficient to create a transaction-enabled layer around a
subsystem that doesn't have any support for this itself, so you should
probably make sure you really have the requirement before you start
working on this.

A pretty long while back I had a look at taking part in
System.Transactions transactions, and I blogged about it here:

  http://www.sturmnet.org/blog/archives/2005/02/07/systemtransactions1/

Later I found an article by Sahil Malik here:

  http://www.codebetter.com/blogs/sahil.malik/archive/2005/04/28/62604.aspx

I'm sure there's more information about this to be found today, nearly two
years later, so the above will probably just be a quick intro, if at all.

               Oliver Sturm
Signature

http://www.sturmnet.org/blog


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.