I just came across a situation in which the IsUniqueValidator created a
deadlock situation.  I traced it to the following code fragment in
IsUniqurValidator

      *      if (SessionScope.Current == null ||
                SessionScope.Current.ScopeType !=
SessionScopeType.Transactional)
            {
                scope = new SessionScope();
            }
*
Basically, it was creating a new scope if the current scope didn't exist or
was not a transaction.  This resulted in a new session (connection) which
conflicted with the current session that was in the act of creating an
entity.

I looked at the log history for IsUniqueValidator and noticed that code was
used to eliminate a deadlock situation which made me scratch my head.  I
removed the check for a transactional scope and my deadlock issue was
resolved.  In addition, all the unit tests that checked for this in AR still
pass.

I run against pretty current versions of NHib so I don't know if something
in there made things work, but I was wondering if I can commit this change.

craig

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" 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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to