locked
Changing the transaction isolation level in the TransactedReceiveScope activities RRS feed

  • Question

  • Because we have locking problems in the database we would like to change the TransactedReceiveScope isolation level from Serializable to ReadCommitted. We have done this using a servicebehaviour extension:

     public class ReadCommittedServiceBehaviour : BehaviorExtensionElement ,IServiceBehavior
    {
    
            public void AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, Collection<ServiceEndpoint> endpoints, BindingParameterCollection bindingParameters)
            {
    
    
            }
    
            public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
            {
                serviceDescription.Behaviors.Add(new ServiceBehaviorAttribute() { TransactionIsolationLevel = IsolationLevel.ReadCommitted });
    
            }
    
            public void Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
            {
    
            }
    
    
            public override Type BehaviorType
            {
                get { return typeof(ReadCommittedServiceBehaviour); }
            }
    
            protected override object CreateBehavior()
            {
                return new ReadCommittedServiceBehaviour();
            }
    }
    

    What I want to know is... is this a good idea at workflow persistence database level? I am worried about the instance creation in the persistence database.

    Thanks


    http://pablocastilla.wordpress.com/

    Tuesday, February 21, 2012 11:32 AM