Up Save code samples
DevForce 2012 Resource Center » Samples » Save code samples » Code sample: Concurrency Conflicts (WPF)

Code sample: Concurrency Conflicts (WPF)

Last modified on September 20, 2012 11:13

This sample shows concurrency detection in action and how to handle common use cases.


Problem

Concurrency handling is a confusing issue, and you'd like to learn more.

Solution

This sample illustrates the diagnosis of concurrency conflicts, and suggests some responses. The solution generates four kinds of concurrency conflicts:

  1. a local change that conflicts with a change made by a remote user
  2. a local deletion that conflicts with a change made by a remote user
  3. a local change that conflicts with a deletion done by a remote user, and
  4. a local deletion that conflicts with a deletion made by a remote user

It shows how to diagnose each type of conflict by examining the save exception thrown and the state of the local entity. At the point of final diagnosis, the code suggests some ways you might then proceed, performing automatic actions or soliciting input from the end user after presenting her with information about the conflict.

Created by DevForce on July 23, 2010 20:11

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade