gregg-f wrote:
the best practice I've heard in general is to keep both connections, and in particular transactions, open for the smallest period of time possible. Session in view goes against this
If yours is a web application, than request cycle is the shortest viable period if you have lazy associations that may need to be filled in the view. The session should be open until all needs of that transaction have been filled, which means once view is rendered.
If you have the view make a new request in a new session, you will lose the benefits of the session-cache, which are significant.
Many many people are using this pattern with great success. Don't throw it away on theoretical grounds: produce a simple prototype and test it. We're engineers, after all!
That being said, your needs may be different.