Getting started with NH n hoping someone can give me a bit of info:

One thing i have found, and am a bit unsure of is:
1. Do i need to flush() before commit() and close()?
i have seen many examples without the flush() statement and many with.
i was under the impression that commit calls it for you (default
flushmode) basically if using transactions – which i think would be a
good idea.

2. If using session per request, is it safe to do separate, unrelated
tasks off the same session? Eg. Save some info, then run a Get or Load
to return a list of results all from the one session? Or do I have to
clear the session first? I'm thinking that session per request sort of
misses the one unit of work each session principle. Or am I wrong?

3. Maybe a silly question, but iv never really looked into singleton
pattern... if I implement sessionfactory using a singleton class, does
this mean it will create sessionfactory on first call, and then make
it available for the life of the browser, so each user will have their
own sessionfactory created? Or does the 1 sessionfactory serve all
users of the website app, once it is created?

Just trying to clear a few of my thoughts up...

Thanks in advance, I'm looking forward to working with the framework!

Franky

--

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