Hi Markus,

sorry for writing such a crap last time: I'm currently only reading
data from some file and write it into the database. So I meant, that
I'm currently not reading data from the db.

1. Is there any way to stop NHibernate from opening too many
sessions?

2. What about batching more queries into one transaction than I have
now?

3. Does flushing a SessionScope mean that the SessionScope is gone?

4. What is the relationship between sessions in NHibernate,
transactions in NHibernate, SessionScopes in AR and TransactionScopes
in AR?

5. I use ID fields with the AR default behavior on Firebird or MSSQL
server.

Thanks,

Flo

On May 4, 6:16 pm, Markus Zywitza <[email protected]> wrote:
> Hi Flo
>
> 2009/5/4 Flominator <[email protected]>> 1. I have one TransactionScope for 
> every row of data, which means 30
> > measurands (one for each channel). The method that opens and disposes
> > the TransactionScope gets the measurands and an enumerator containing
> > my channels. It iterates over the channels and adds one measurand to
> > each one.
>
> That's a problem. NH mandates transactions, but it doesn't support
> nesting them. To make TransactionScopes nestable, each scope that
> requires a new transaction (the default behaviour) does therefor open
> a new session as well.
> If you are only reading data, try using a SessionScope without
> automatic flushing.
>
> > 2. No, I don't use explicit IDENTITY fields, only primary keys.
>
> Do you have PKs using IDENTITY fields?
>
> -Markus
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to