Hi, i am new to hibernate when i start my first program i got lazy initialization exception, some one suggested me to change the fetch.LAZY annotation in fetch.EAGER the problem is solved for now. Due to that change i think i stuck with another one i have around 10 classes and for the server i need everything loaded.I was avoiding using FetchType.EAGER as that meant its always eager and in particular the web front end loads everything - but perhaps that is the way to go - is there any thing to other than this. If yes please give me a valuable suggestion. Some one suggested me to use second-level cache is it solve my problem this is same as my previous post please help me.
Joined: Dec 16, 2011
to work lazy loading for web views configure hibernate filter in web.xml
use Open Session In View pattern