On Feb 10, 4:07 pm, Jason Meckley <[email protected]> wrote:
> GC runs in the background, The memory will be released when GC occurs, but
> that may not be the instant you call dispose.

No, at least in my setup the memory would never be released...memory
usage would just increase and increase.
An explicit GC.Collect did not free the memory either but the
GC.SuppressFinalize call helped.

Anyway, it does not seem that there is any safe way of unloading a
SessionFactory so, at least in this scenario
the Dispose method is not helpful.

> I can only imagine 1 scenario
> where you would need 100+ session factories: multitenancy. There are ways to
> map a multitenant application with a single session factory which will also
> help reduce memory consumption.

That sounds interesting...where can I find more information about
this? It should be noted that the schema is the same
in all the databases so it should be possible to use the same schema
info for all the databases but is there any 'official'
way of doing this? Won't it cause problems in areas related to caching
and transactions?

<other options>

We really want/have to avoid large rewrites and re-architecting at
this time if possible. =)

> The fact that you need 500-1000 factories for 30+ users, seems like a
> architectural problem of the system.

Well, we don't really need the 1000 factories...but we do need the
1000 databases for various reasons. =)


Leif Vaarum

-- 
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