Hm, interesting observation with NHProfiler.

I was referring to the end of the section I linked to: "
Unfortunately, you can't use hilo when supplying your own
IDbConnection to NHibernate. NHibernate must be able to fetch the "hi"
value in a new transaction."

I have always interpreted that as "NHibernate needs to get a second,
parallell, connection, so that it can open a new (i.e. distinct)
transaction to get the hi-value, which will then be closed."

Maybe the true story is more complex?

/Oskar



2010/2/2 [email protected] <[email protected]>:
> Hello oscar, I fail to see any mention of "distinct transaction" in
> the url you've posted.
>
> I tried Ayende's NHProfiler. For a sample piece of code what i see
> is ,the application starts, a transaction being opened, hilo is
> updated and retrieved, and with in "same" transaction, the next sqls
> are executed then transaction is commited. So my concern is if that
> "first" transaction lasts longer, other read committed transactions
> may not be able to get latest value of hilo. May be I am missing
> something . But this is my current observation.
>
>
> On Feb 2, 11:30 am, Oskar Berggren <[email protected]> wrote:
>> I'm unsure if I get you correctly: First you speak about transaction
>> isolation level, but at the end you ask about "distinct transaction".
>>
>> According to the reference, a distinct transaction is 
>> used:http://nhforge.org/doc/nh/en/index.html#mapping-declaration-id-hilo
>>
>> /Oskar
>>
>> 2010/2/2 [email protected] <[email protected]>:
>>
>>
>>
>> > Any ideas ?
>>
>> > On Jan 29, 12:08 pm, "[email protected]" <[email protected]> wrote:
>> >> It seems , getting the hi value from generator table occurs in the
>> >> first transaction level that we create from our application which
>> >> sounds a bit dangerous to me.
>>
>> >> Suppose two different applications start at same time,both of their
>> >> first transactions' will take some long time.
>> >> If transaction A updates,hilotable, then transaction B will wait A
>> >> to finish  to get its next value assuming both transactions are read
>> >> committed. Am I thinking wrong? I have a feeling thehilogetting
>> >> process should be done in a distinct transaction.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "nhusers" 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 
>> > athttp://groups.google.com/group/nhusers?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "nhusers" 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/nhusers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to