Results 1 to 2 of 2

Thread: How does spring.net supplies connections to DB?

  1. #1
    Join Date
    Jun 2012
    Posts
    1

    Default How does spring.net supplies connections to DB?

    Hello All,
    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?

  2. #2
    Join Date
    Jul 2010
    Posts
    245

    Default

    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.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •