Hi, I'm using Wicket + Hibernate (without Spring).
In my application I open Hibernate *session* in WebRequestCycle.*
onBeginRequest*() and close it in WebRequestCycle.*onEndRequest*().

But having association (many-to-one mappings between classes) I've got
LazyInitializationException (no Session). I've just set parameter
"*lazy*"=false
in hibernate mapping file to "many-to-one" mappings. And it worked fine -
amount of data stored in memory in this case was not critical.

Since the system is growing furhter, the method with no lazy initialization
is no more suitable. Could you, please, advise me a way to handle hibernate
session to have lazy initialization. (Solution with no Spring is
preferable).

// Best regards, Anton

Reply via email to