You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by pieter claassen <pi...@claassen.co.uk> on 2010/01/27 15:51:21 UTC

Serialization test

I want to test the following:
1. Whether I have any private members stored on my pages that are not
a primitive java type, or IModel
2. If they are IModels, that I do call onDetach() on them.

Reflection helps me to answer the 1st question but the second one baffles
me. Any tips on how to verify that I am calling onDetach() on all privately
stored  IModels?

I notice that Martijn has a presentation on the subject here, but there is
just not enough code in there for me to get to solution myself.
http://www.slideshare.net/dashorst/keep-your-wicket-application-in-production

Thanks,
Pieter

Re: Serialization test

Posted by Jonas <ba...@gmail.com>.
You can't verify for any IModel if it has been detached, but what works
fine is e.g. checking all LoadableDetachableModel subclasses.
You have to rely on specific IModel implementations that have some kind
of API to check if they have been detached, just like
LoadableDetachableModel#isAttached()

On Wed, Jan 27, 2010 at 3:51 PM, pieter claassen <pi...@claassen.co.uk> wrote:
> I want to test the following:
> 1. Whether I have any private members stored on my pages that are not
> a primitive java type, or IModel
> 2. If they are IModels, that I do call onDetach() on them.
>
> Reflection helps me to answer the 1st question but the second one baffles
> me. Any tips on how to verify that I am calling onDetach() on all privately
> stored  IModels?
>
> I notice that Martijn has a presentation on the subject here, but there is
> just not enough code in there for me to get to solution myself.
> http://www.slideshare.net/dashorst/keep-your-wicket-application-in-production
>
> Thanks,
> Pieter
>

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


Re: Serialization test

Posted by Marat Radchenko <sl...@gmail.com>.
Force your servlet container to serialize sessions after each request
and add non-serializable field to objects that you don't want to be
serialized.

2010/1/27 pieter claassen <pi...@claassen.co.uk>:
> I want to test the following:
> 1. Whether I have any private members stored on my pages that are not
> a primitive java type, or IModel
> 2. If they are IModels, that I do call onDetach() on them.
>
> Reflection helps me to answer the 1st question but the second one baffles
> me. Any tips on how to verify that I am calling onDetach() on all privately
> stored  IModels?
>
> I notice that Martijn has a presentation on the subject here, but there is
> just not enough code in there for me to get to solution myself.
> http://www.slideshare.net/dashorst/keep-your-wicket-application-in-production
>
> Thanks,
> Pieter
>

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