Session Caching

As I understand it (reading: measured), building a configuration and sessionfactory certainly takes longer when executing a query using nhibernate. Is there anything against creating sessionfactory static, so it will only be configured once on appDomain?

I know that when using this approach there are problems with blocking and racing games, but personally I don’t see how it will violate my application when using this approach in sessionfactory.

The reason I ask about this is because it is very difficult to check for possible problems with threads, as this does not happen all the time.

+3
source share
1 answer

factory . .

+5

Source: https://habr.com/ru/post/1697710/


All Articles