[ Create account | Log-in ] Home ::  Downloads ::  Web links ::  FAQ 
Main Menu

Online
There are 3 unregistered users and 0 registered users on-line.

You can log-in or register for a user account here.



Transactions as Well!
Posted Oct 18, 2004 - 07:42 AM


C# Persistent Framework News This next version is truly going to be quite a major upgrade. Ive just finished implementing Transactions within the Framework, so you can now safely call .Save() and can ensure that the database will either be commited with data or Rolled back if there was a validation problem.

Im also trying out an experimental feature which Ive never done before: In Memory transactions. i.e. I keep track of the state of the object by making a copy of it and using that copy if i ever need to rollback. Now this seems like some hair brained idea, since it means twice the amount of memory would be needed to keep track of both modified and unmodified objects. However, Ill continue implementing this, and when and IF we see any performance degradations, it will be just a compile switch away ...

Just to highlight what I mean by In Memory Transactions, check out this NUnit code fragment:


mObj2.MyString = "Two";
mObj2.BeginAtomic();
mObj2.MyString = "Three";
mObj2.BeginAtomic();
mObj2.MyString = "Four";
mObj2.BeginAtomic();
Assert.AreEqual( "Four", mObj2.MyString );
mObj2.RollbackAtomic();
Assert.AreEqual( "Four", mObj2.MyString );
mObj2.RollbackAtomic();
Assert.AreEqual( "Three", mObj2.MyString );
mObj2.RollbackAtomic();
Assert.AreEqual( "Two", mObj2.MyString );




yk.


 
Login
 



 


 Log in Problems?
 New User? Sign Up!

Related links
· More about C# Persistent Framework News
· News by yoonkit


Most-read story in C# Persistent Framework News:
All about Enums

Transactions as Well! | Log-in or register a new user account | 0 Comments
Comments are statements made by the person that posted them.
They do not necessarily represent the opinions of the site editor.

Other Stories
· Downtime ... mysql (Nov 16, 2005)
· Editable Grids, and OnPopulateCell.. Change of param signature (Sep 11, 2005)
· Right hand Column (Sep 02, 2005)
· site down.... (Aug 18, 2005)
· More Apps with csopf (Aug 09, 2005)
· Namespace change for ASP (Aug 09, 2005)
· Searching with subselects (Jul 05, 2005)
· Strange Links. (Jun 16, 2005)
· csopf is listed in the UNDP - International Open Source Network (Jun 14, 2005)
· All about Enums (Jun 10, 2005)

Poll
How do you persist your objects?

· With an Object Persistent Framework
· Manually write out SQL statements
· Object to RDBMS Mapper
· CRUD is Code Gen'ed
· Dont need to - OODB!
· Real men dont store data!

[ Results | Polls ]

Votes: 119
Comments: 0


Login
 



 


 Log in Problems?
 New User? Sign Up!

Past Articles
Friday, June 10
·Namespace change for UIs. (0)
Tuesday, June 07
·csopf-v0.4.0 is finally out! (0)
Monday, June 06
·csopf works with mono (0)
Sunday, June 05
·Revamp to the csopf Website (0)
Sunday, December 05
·Wot?! No Updates?! (219)
Monday, October 18
·Transactions as Well! (124)
Monday, October 11
·ASP.NET.... working on it! (272)
Thursday, September 30
·.Net Reflection and Performance (127)
Wednesday, September 22
·csopf-v0.3.9 - Major Changes (82)
Thursday, September 16
·Work In Progress for v0.3.9 (256)
 Older articles
Home ::  Share your story :: 

Web site powered by PostNuke yoonkits blog Malaysian IndependantDot Net Developers


All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest (c) 2004 by me
This web site was made with PostNuke, a web portal system written in PHP. PostNuke is Free Software released under the GNU/GPL license.
You can syndicate our news using the file backend.php