How does spring.net supplies connections to DB?
I use Spring.Data to access data in my project.
And I have on trouble related with deadlocks.
I found out that deadlock is occured in my application due to two threads access my DB throuth the one connection.
One thread updates data by the clustered index, another one makes just a simple selection also by this clustered index.
Could you advice me is there any ability to ensure that one connection will not be used at the same time?
Is it possible for you to provide a simple (console) app that demonstrates this issue? SPRNET relies on the underlying ADO.NET connection pooling in the .NET framework to manage its connections -- its (perhaps) not _impossible_ that there is an issue here with SPRNET, but its more likely that you have hit upon a (potential) problem in ADO.NET (or more specifically, the ADO.NET IDbConnection provider that is provided by your database vendor).
SPRNET doesn't cache or reuse connections, instead its wholly dependent upon the ADO.NET provider to do service connections. Is is (perhaps) possible that you are calling something from multiple threads in Spring.Data as a singleton when it needs to be non-singleton-scoped? If you can provide a simple app that reproduces this issue, we'd be happy to take a look at it for you.