Hi Antoine,
The pattern that we encourage our customers to use, as a best practices approach, is to handle the OpenAccess in a per-thread fashion. This means that there should be one instance of an OpenAccessContext for each thread performing CRUD operations in your application. Otherwise there is always a chance to have multiple threads accessing data that is not intended to be shared among threads.
I would like to suggest you to have a look into the following KB articles, one of those targets
Web scenarios and the second one, a normal
multi-threaded desktop scenario.
I would like to tell you that the OpenAccessContext is a light-weight object and it will present no overhead to your application if you hold multiple instances of it. This would probably mean some major re-factoring for you but this is really the approach I would suggest you at the moment.
Please do let us know if this approach is acceptable for you and if you have any concerns regarding it.
Greetings,
Zoran
the Telerik team
Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!