Sounds like these threads share a SessionScope and thus it's Transaction. You should rather have a SessionScope per request. You can then tweak that threading behaviour by using transaction isolation settings in the config as each request will have its own transaction
-Markus 2009/5/29 ebaker280 <[email protected]>: > > I'm using Castle AR in a WCF service, running on a net.tcp endpoint. I > have a table that will store a bunch of unique strings, and other > tables will reference it in a one-to-many relationship. > > The problem is that if I have several clients trying to create a row > with the same string simultaneously on their own threads, each one > will succeed, and I'll end up with 'n' number of duplicate strings in > the table. I've tried using ValidateIsUnique on the property, but it > seems to only work within its own thread. > > I've been able to use locks to make this work, but that seems terribly > inefficient. Am I missing something simple with regards to > SessionScope or something? > > Thanks > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
