I think the memleak will not occur that easily because i believe
hibernate removes the session from each proxy / persistent bag after
it is closed. But you really should use the LDM (or another sort of
lazy loading model) because it will prevent a lot of
lazyinitexceptions and other hibernate exceptions that might occur
because the session for those objects is no longer available.
Maurice
On Thu, Mar 13, 2008 at 3:04 PM, carloc <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> I have been reading wicket in action recently and I have seen pitfalls of
> hibernate section.
> I was wondering about the stuff about hibernate and memory leaks due to
> hibernate proxy objects maintaining a reference to the session with them....
>
>
> Am I doing this wrong then?
> @SpringBean
> private UserService userService;
>
> add(new ListView("user", userService.findUsers() {
> })
>
> is this wrong? I'm using it directly meaning it will be stored in the page
> store right?
>
> should i be doing this instead?
>
> LoadableDetachableModel model = new LoadableDetachablemodel() {
> Object load() {
> return usrService.findUsers()
> }
>
> }
> }
>
> add(new ListView("listView", model)) {
> }
>
> this is to avoid storing the users in the session...
> will doing the first one actually result in a memory leak?
>
> thanks
> --
> View this message in context:
> http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16025532.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]