Re: How to detect model "leakage" into session

2009-08-27 Thread Martijn Dashorst
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

Re: How to detect model "leakage" into session

2009-08-27 Thread Bas Gooren
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

Re: How to detect model "leakage" into session

2009-08-27 Thread Eelco Hillenius
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,

Re: How to detect model "leakage" into session

2009-08-26 Thread Bas Gooren
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

Re: How to detect model "leakage" into session

2009-08-26 Thread Bas Gooren
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

Re: How to detect model "leakage" into session

2009-08-26 Thread Scott Swank
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, >

Re: How to detect model "leakage" into session

2009-08-26 Thread Bas Gooren
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,

Re: How to detect model "leakage" into session

2009-08-26 Thread Bas Gooren
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

Re: How to detect model "leakage" into session

2009-08-26 Thread Michael Mosmann
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

Re: How to detect model "leakage" into session

2009-08-26 Thread Scott Swank
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

Re: How to detect model "leakage" into session

2009-08-26 Thread Bas Gooren
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

Re: How to detect model "leakage" into session

2009-08-26 Thread Sven Meier
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() {

How to detect model "leakage" into session

2009-08-26 Thread 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() method called. Nonetheless, after hitting two fairly simple pages which lis