WCF Masterclass with Juval Lowy

Published Wednesday, February 7, 2007 11:39 PM

I have been lucky enough to be attending a WCF Masterclass this week taught by Juval Lowy and organised by readify. Its an awesome course and I am learning an incredible amount about WCF (Windows Communication Foundation). You know you’re on a good course when not only do you learn a lot about the specific topic of the course, but I am also picking up an incredible amount of useful tips and code along the way, not strictly tied to WCF.

For example, I never knew that Juval created and delivered a set of transactional objects for use as a Volatile Resource Manager. By this I mean, that an integer is transactional, a DictionaryList is transactional, a string is transactional, a List, queue and Array are transactional, and these objects can participate in full fledged transactions, whether using the Lightweight transaction manager, Kernel Transaction Manager, Distributed Transaction Co-ordinator or other derivative.

For example:

TransactionalArray<int> numbers = new TransactionalArray<int>(3);

numbers[0] = 1;

numbers[1] = 2;

numbers[2] = 3;

 

using (TransactionScope scope = new TransactionScope() )

{

  numbers[0] = 99;

  numbers[1] =88;

  numbers[2] =77;

}

 

// numbers[2] == 3 at this point as we did not Complete/Commit the transaction before it exited the scope.

 

TransactionalArray<int> numbers = new TransactionalArray<int>(3);

numbers[0] = 0;

numbers[1] = 0;

numbers[2] = 0;

 

using (TransactionScope scope = new TransactionScope() )

{

  numbers[0] = 99;

  numbers[1] =88;

  numbers[2] =77;

  scope.Complete();

}

 

// numbers[2] == 77 at this point as we DID Complete/Commit the transaction before it exited the scope.

Apparently Juval released this stuff way back in late 2005 (and is on MSDN somewhere). I just had no idea, and its a super cool implementation of transacted objected. Again, these guys fully participate in all manner of promotable transactions. Juval has included transactable generic versions of all the collections. You can grab it from this page, Just look for Volatile Resource Managers.

by Glav

Comments

# John F. Martin said on Saturday, May 16, 2009 8:09 AM

Hi Glav,

Thanks for the post. I was at the Mallorca WCF Master Class as well as the Munich class last year, both were great. We will have the class in Zurich, Switzerland next month .Top of Zurich, Uto Kulm Hotel www.utokulm.ch (cool location), June 29-July 3, 2009. We still have some seats available and would apprectiate a post if possible.

Thanks

John F. Martin

Leave a Comment

(required) 
(required) 
(optional)
(required) 

This Blog

Syndication