The focus of the next few posts won't be focused on the System.Transactions resource manager interfaces. However, in order to be able to ground discussion in some examples, I'm going to lay out the external view of our target resource manager.
Our resource manager will manage a name/value pairs -- it will be a property bag, in other words. The values can be objects, the names are strings. It will support the normal CRUD actions: I can insert new names into the bag, I can remove names from the bag, I can read values associated with a name, and I can write new values associated with a name.
I can access the property bag simultaneously from several threads in several transactions. Once we've done that, we'll make it durable. Finally, we'll make it support access from multiple processes.
So far, the property bag looks like:
public class TxPropertyBag
{
public TxPropertyBag ();
public TxPropertyBag (string bagName);
public string BagName
{
get;
}
public object BagValue (string name)
{
get;
set;
}
public void RemoveBagValue (string name);
public void AddBagValue (string name, object value);
}
Note that we could have modeled the bag more closely to a normal collection. I've not done so thus far in order to help keep the focus on how to make the property bag transaction aware.
Update: As a final step, we'll extend the property bag interface with an ability to enumerate the properties in the bag.
Posted
Jan 24 2006, 07:55 PM
by
jim-johnson