Hibernate version:
1.2
Reading the docs get me the impression that an ISession isn't suppose to open a database connection when created but when first used. From the docs...
"The legacy (1.0.x) behavior of NHibernate in regards to ADO.NET connection management was that a ISession would obtain a connection when it was first needed and then hold unto that connection until the session was closed. NHibernate 1.2 introduced the notion of connection release modes to tell a session how to handle its ADO.NET connections."
However, when creating a session ([IUnitOfWorkFactory].OpenSession()], it seems to defaults to an open connection (IsConnected property returns true).
Have I misunderstood the documentation? Or isn't just the releasing of the connection but also the creation of it that changed in version 1.2? Or, maybe, is the IsConnected not returning the right result until the first query to the data source?
Regards
Roger
|