Hi sjhyam,
It is a good thing that you don't use OSIV, all the time the hibernate session is open, you are blocking a precious sql Connection instance. The best way to do things is to load relationships you'll need in the business (controller) layer. If you want to factorize some loading methods to be used by many views, the best way is to pass a String[] argument containing all needed dependencies to your business layer. If a command pattern was able to resolve the problem, I think it'd be directly on the hibernate site for a while. Hibernate is an "old" product, no more best practices are to be descovered or invented.
Regards,
Zied Hamdi
_________________ Regards,
Zied Hamdi
|