hi,

you could also use an Aspekt (e.g. with Aspekj) zu reinit all lazy
proxies on the next request. The Proxy objects would be detachted and
serialized throw
the models. With an Aspekt you can re-attach ALL hibernate proxies,
without triggering the DB.

Martin



Anton Komratov schrieb:
> 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
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to