Hi, I'm attempting to use DbLinq in an application that runs a 10 to 20 concurrent threads which access the database. I've been tracking down sporadic exception related to DbLinq operations and from what I've been able to glean so far it looks like the DatabaseContext class is caching the database connection object and on each access is checking whether the connection is open or not. If this is the case it's a problem when multiple threads are using the same DataContext object since they'll end up with multiple threads using the connection at the same time and having a situation where the responses will be incorrectly parsed.
For connection pooling in ADO.Net a new database connection should be created each time a databse connection object is needed and the connection pool takes care of making connection re-use efficient. That solves the problem for multi-threaded apps as long as they don't try and pass a database connection object around which they shouldn't. Regards, Aaron --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
