By now, SessionScope uses an implicit transaction, too. To be more precise,
all scopes that derive from AbstarctScope do so as well.
Simply discard the check for the SessionScopeType. There shouldn't be any
problems.

-Markus
2008/11/12 Craig Neuwirt <[EMAIL PROTECTED]>

> Ok, so how can make it work for both scenarions
>
>
> On Wed, Nov 12, 2008 at 3:23 PM, Ayende Rahien <[EMAIL PROTECTED]> wrote:
>
>> I think in 1.2 it related to the issue of not using TX by default.
>>
>>
>> On Wed, Nov 12, 2008 at 11:15 PM, Craig Neuwirt <[EMAIL PROTECTED]>wrote:
>>
>>> 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