Or check your pages for references to your entities at the end of the request:
private void testDetachedObjects(final Page page)
{
Page responsePage = getResponsePage();
if (page == null || page.isErrorPage()
|| (responsePage
Eelco,
Thanks for your tip.
Bas
- Original Message -
From: "Eelco Hillenius"
To:
Sent: Thursday, August 27, 2009 10:09 AM
Subject: Re: How to detect model "leakage" into session
One 'hack' of a way to check whether you have stuff in your session
One 'hack' of a way to check whether you have stuff in your session
that shouldn't be, is to make sure that the objects you don't want
sticking around are not serializable, and you'll see stacktraces soon
enough. If that's an options, it's a useful hack...
Eelco
On Wed, Aug 26, 2009 at 12:29 PM,
Scott,
That's what I thought.
Bas
- Original Message -
From: "Scott Swank"
To:
Sent: Wednesday, August 26, 2009 10:53 PM
Subject: Re: How to detect model "leakage" into session
Bas,
The code you showed is fine, foo will be garbage collected. You
Obviously that's going to increase session size as it's a direct reference
to an object.
Thanks for giving me some pointers!
Bas
- Original Message -
From: "Bas Gooren"
To:
Sent: Wednesday, August 26, 2009 10:27 PM
Subject: Re: How to detect model "leakage&quo
inal Message - From: "Michael Mosmann"
> To:
> Sent: Wednesday, August 26, 2009 10:13 PM
> Subject: Re: How to detect model "leakage" into session
>
>
>> Am Mittwoch, den 26.08.2009, 21:29 +0200 schrieb Bas Gooren:
>>>
>>> Hi all,
>
model, and
calling it's detach() method when its own onDetach() is called.
Thanks anyway!
Bas
- Original Message -
From: "Michael Mosmann"
To:
Sent: Wednesday, August 26, 2009 10:13 PM
Subject: Re: How to detect model "leakage" into session
Am Mittwoch,
s
- Original Message -
From: "Scott Swank"
To:
Sent: Wednesday, August 26, 2009 10:11 PM
Subject: Re: How to detect model "leakage" into session
If you are certain that detach is always called then you must have
references to the underlying model objects. I wou
Am Mittwoch, den 26.08.2009, 21:29 +0200 schrieb Bas Gooren:
> Hi all,
>
> My problem is as follows: I use LoadableDetachableModels throughout my
> application, and have made sure I never use a model without it being attached
> to a component to prevent models which never get their detach() meth
in my
> session.
>
> Bas
>
> - Original Message - From: "Sven Meier"
> To:
> Sent: Wednesday, August 26, 2009 9:48 PM
> Subject: Re: How to detect model "leakage" into session
>
>
>> Hi,
>>
>> you're probably
n my
session.
Bas
- Original Message -
From: "Sven Meier"
To:
Sent: Wednesday, August 26, 2009 9:48 PM
Subject: Re: How to detect model "leakage" into session
Hi,
you're probably doing something like the following:
add(new Label("foo", ldm.getObject().g
Hi,
you're probably doing something like the following:
add(new Label("foo", ldm.getObject().getFoo()));
Never do that, instead use:
add(new Label("foo", new PropertyModel(ldm, "foo")));
... or ...
add(new Label("foo", new AbstractReadonlyModel() {
public Object getObject() {
Hi all,
My problem is as follows: I use LoadableDetachableModels throughout my
application, and have made sure I never use a model without it being attached
to a component to prevent models which never get their detach() method called.
Nonetheless, after hitting two fairly simple pages which lis
13 matches
Mail list logo