Hi, I have an eclipse rcp application and use hibernate for database access. My question refers to lazyloading. I have a treeviewer (like an explorer) which is instantiated when a view opens in eclipse, there I open the session and do the transactions.
I could not close the session because I only want to load a new object in my treeviewer, when the user wants to get it -> lazyloading.
I read that
Quote:
The session objects should not be kept open for a long time because they are not usually thread safe and they should be created and destroyed them as needed
.
But I can only close this session, when I close the whole view in eclipse. It could take a long time since it´s been closed. I´m a little bit confused if it is the right way. I want to use this great feature lazyloading of hibernate.
Thanks in Advance!