You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Thomas Mäder <to...@gmail.com> on 2008/08/11 13:44:48 UTC

Always serialize pages for debug purposes

Hi Guys,

I seem to remember that there was a way to force Wicket to always serialize
pages on detach in order to make sure every page is serializable during
development. Can someone please point me to the FM so I can read it?
Searching Nabble & Google didn't turn up anything.

this is 1.3.3

Thomas

Re: Always serialize pages for debug purposes

Posted by James Carman <ja...@carmanconsulting.com>.
The only problem with having to look at the console is that sometimes
other logging can make that stuff fly by.  And, if you're not watching
it, it's not obvious there's a problem.  Perhaps a better solution
might be to check serializability using a unit test rather than by
exercising the pages manually.

On Mon, Aug 11, 2008 at 6:18 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> well, then check who removed them and ask them why they did that...
>
> personally i dont mind looking into the console, but thats just me...
>
> -igor
>
> On Mon, Aug 11, 2008 at 2:10 PM, James Carman
> <ja...@carmanconsulting.com> wrote:
>> But, it's in a separate thread, right?  So, you'll have to look for
>> error messages in a log file (or console window).  Would a more
>> drastic response (error in the browser) be more appropriate during
>> development?
>>
>> On Mon, Aug 11, 2008 at 11:34 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>>> with the default diskstore pages are always serialized...
>>>
>>> -igor
>>>
>>> On Mon, Aug 11, 2008 at 8:23 AM, Thomas Mäder <to...@gmail.com> wrote:
>>>> Ah bugger! That was most convenient! I'd be very much in favor of it's
>>>> making a comeback
>>>>
>>>> Thomas
>>>>
>>>> On Mon, Aug 11, 2008 at 4:56 PM, Jonas <ba...@gmail.com> wrote:
>>>>
>>>>> It seems this feature was removed, but there's some javadoc
>>>>> left in org.apache.wicket.settings.IDebugSettings:
>>>>> [quote]
>>>>> <i>serializeSessionAttributes</i> (defaults to true in development
>>>>> mode) - Causes the framework
>>>>>  * to serialize any attribute put into session - this helps find Not
>>>>> Serializable errors early
>>>>> [/quote]
>>>>>
>>>>> On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder <to...@gmail.com>
>>>>> wrote:
>>>>> > Yeah, but wasn't there "official" support for that? And if not, wouldn't
>>>>> > this be useful for debug?
>>>>> >
>>>>> > Thomas
>>>>> >
>>>>> > 2008/8/11 Uwe Schäfer <sc...@thomas-daily.de>
>>>>> >
>>>>> >> Thomas Mäder schrieb:
>>>>> >>
>>>>> >>
>>>>> >>  I seem to remember that there was a way to force Wicket to always
>>>>> >>> serialize
>>>>> >>> pages on detach in order to make sure every page is serializable during
>>>>> >>> development. Can someone please point me to the FM so I can read it?
>>>>> >>> Searching Nabble & Google didn't turn up anything.
>>>>> >>>
>>>>> >>
>>>>> >> one guy once posted this one:
>>>>> >>
>>>>> >>
>>>>> >> <snip>
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Always serialize pages for debug purposes

Posted by Igor Vaynberg <ig...@gmail.com>.
well, then check who removed them and ask them why they did that...

personally i dont mind looking into the console, but thats just me...

-igor

On Mon, Aug 11, 2008 at 2:10 PM, James Carman
<ja...@carmanconsulting.com> wrote:
> But, it's in a separate thread, right?  So, you'll have to look for
> error messages in a log file (or console window).  Would a more
> drastic response (error in the browser) be more appropriate during
> development?
>
> On Mon, Aug 11, 2008 at 11:34 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>> with the default diskstore pages are always serialized...
>>
>> -igor
>>
>> On Mon, Aug 11, 2008 at 8:23 AM, Thomas Mäder <to...@gmail.com> wrote:
>>> Ah bugger! That was most convenient! I'd be very much in favor of it's
>>> making a comeback
>>>
>>> Thomas
>>>
>>> On Mon, Aug 11, 2008 at 4:56 PM, Jonas <ba...@gmail.com> wrote:
>>>
>>>> It seems this feature was removed, but there's some javadoc
>>>> left in org.apache.wicket.settings.IDebugSettings:
>>>> [quote]
>>>> <i>serializeSessionAttributes</i> (defaults to true in development
>>>> mode) - Causes the framework
>>>>  * to serialize any attribute put into session - this helps find Not
>>>> Serializable errors early
>>>> [/quote]
>>>>
>>>> On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder <to...@gmail.com>
>>>> wrote:
>>>> > Yeah, but wasn't there "official" support for that? And if not, wouldn't
>>>> > this be useful for debug?
>>>> >
>>>> > Thomas
>>>> >
>>>> > 2008/8/11 Uwe Schäfer <sc...@thomas-daily.de>
>>>> >
>>>> >> Thomas Mäder schrieb:
>>>> >>
>>>> >>
>>>> >>  I seem to remember that there was a way to force Wicket to always
>>>> >>> serialize
>>>> >>> pages on detach in order to make sure every page is serializable during
>>>> >>> development. Can someone please point me to the FM so I can read it?
>>>> >>> Searching Nabble & Google didn't turn up anything.
>>>> >>>
>>>> >>
>>>> >> one guy once posted this one:
>>>> >>
>>>> >>
>>>> >> <snip>
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Always serialize pages for debug purposes

Posted by James Carman <ja...@carmanconsulting.com>.
But, it's in a separate thread, right?  So, you'll have to look for
error messages in a log file (or console window).  Would a more
drastic response (error in the browser) be more appropriate during
development?

On Mon, Aug 11, 2008 at 11:34 AM, Igor Vaynberg <ig...@gmail.com> wrote:
> with the default diskstore pages are always serialized...
>
> -igor
>
> On Mon, Aug 11, 2008 at 8:23 AM, Thomas Mäder <to...@gmail.com> wrote:
>> Ah bugger! That was most convenient! I'd be very much in favor of it's
>> making a comeback
>>
>> Thomas
>>
>> On Mon, Aug 11, 2008 at 4:56 PM, Jonas <ba...@gmail.com> wrote:
>>
>>> It seems this feature was removed, but there's some javadoc
>>> left in org.apache.wicket.settings.IDebugSettings:
>>> [quote]
>>> <i>serializeSessionAttributes</i> (defaults to true in development
>>> mode) - Causes the framework
>>>  * to serialize any attribute put into session - this helps find Not
>>> Serializable errors early
>>> [/quote]
>>>
>>> On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder <to...@gmail.com>
>>> wrote:
>>> > Yeah, but wasn't there "official" support for that? And if not, wouldn't
>>> > this be useful for debug?
>>> >
>>> > Thomas
>>> >
>>> > 2008/8/11 Uwe Schäfer <sc...@thomas-daily.de>
>>> >
>>> >> Thomas Mäder schrieb:
>>> >>
>>> >>
>>> >>  I seem to remember that there was a way to force Wicket to always
>>> >>> serialize
>>> >>> pages on detach in order to make sure every page is serializable during
>>> >>> development. Can someone please point me to the FM so I can read it?
>>> >>> Searching Nabble & Google didn't turn up anything.
>>> >>>
>>> >>
>>> >> one guy once posted this one:
>>> >>
>>> >>
>>> >> <snip>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Always serialize pages for debug purposes

Posted by Igor Vaynberg <ig...@gmail.com>.
with the default diskstore pages are always serialized...

-igor

On Mon, Aug 11, 2008 at 8:23 AM, Thomas Mäder <to...@gmail.com> wrote:
> Ah bugger! That was most convenient! I'd be very much in favor of it's
> making a comeback
>
> Thomas
>
> On Mon, Aug 11, 2008 at 4:56 PM, Jonas <ba...@gmail.com> wrote:
>
>> It seems this feature was removed, but there's some javadoc
>> left in org.apache.wicket.settings.IDebugSettings:
>> [quote]
>> <i>serializeSessionAttributes</i> (defaults to true in development
>> mode) - Causes the framework
>>  * to serialize any attribute put into session - this helps find Not
>> Serializable errors early
>> [/quote]
>>
>> On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder <to...@gmail.com>
>> wrote:
>> > Yeah, but wasn't there "official" support for that? And if not, wouldn't
>> > this be useful for debug?
>> >
>> > Thomas
>> >
>> > 2008/8/11 Uwe Schäfer <sc...@thomas-daily.de>
>> >
>> >> Thomas Mäder schrieb:
>> >>
>> >>
>> >>  I seem to remember that there was a way to force Wicket to always
>> >>> serialize
>> >>> pages on detach in order to make sure every page is serializable during
>> >>> development. Can someone please point me to the FM so I can read it?
>> >>> Searching Nabble & Google didn't turn up anything.
>> >>>
>> >>
>> >> one guy once posted this one:
>> >>
>> >>
>> >> <snip>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

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


Re: Always serialize pages for debug purposes

Posted by Thomas Mäder <to...@gmail.com>.
Ah bugger! That was most convenient! I'd be very much in favor of it's
making a comeback

Thomas

On Mon, Aug 11, 2008 at 4:56 PM, Jonas <ba...@gmail.com> wrote:

> It seems this feature was removed, but there's some javadoc
> left in org.apache.wicket.settings.IDebugSettings:
> [quote]
> <i>serializeSessionAttributes</i> (defaults to true in development
> mode) - Causes the framework
>  * to serialize any attribute put into session - this helps find Not
> Serializable errors early
> [/quote]
>
> On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder <to...@gmail.com>
> wrote:
> > Yeah, but wasn't there "official" support for that? And if not, wouldn't
> > this be useful for debug?
> >
> > Thomas
> >
> > 2008/8/11 Uwe Schäfer <sc...@thomas-daily.de>
> >
> >> Thomas Mäder schrieb:
> >>
> >>
> >>  I seem to remember that there was a way to force Wicket to always
> >>> serialize
> >>> pages on detach in order to make sure every page is serializable during
> >>> development. Can someone please point me to the FM so I can read it?
> >>> Searching Nabble & Google didn't turn up anything.
> >>>
> >>
> >> one guy once posted this one:
> >>
> >>
> >> <snip>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Always serialize pages for debug purposes

Posted by Jonas <ba...@gmail.com>.
It seems this feature was removed, but there's some javadoc
left in org.apache.wicket.settings.IDebugSettings:
[quote]
<i>serializeSessionAttributes</i> (defaults to true in development
mode) - Causes the framework
 * to serialize any attribute put into session - this helps find Not
Serializable errors early
[/quote]

On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder <to...@gmail.com> wrote:
> Yeah, but wasn't there "official" support for that? And if not, wouldn't
> this be useful for debug?
>
> Thomas
>
> 2008/8/11 Uwe Schäfer <sc...@thomas-daily.de>
>
>> Thomas Mäder schrieb:
>>
>>
>>  I seem to remember that there was a way to force Wicket to always
>>> serialize
>>> pages on detach in order to make sure every page is serializable during
>>> development. Can someone please point me to the FM so I can read it?
>>> Searching Nabble & Google didn't turn up anything.
>>>
>>
>> one guy once posted this one:
>>
>>
>> <snip>
>

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


Re: Always serialize pages for debug purposes

Posted by Thomas Mäder <to...@gmail.com>.
Yeah, but wasn't there "official" support for that? And if not, wouldn't
this be useful for debug?

Thomas

2008/8/11 Uwe Schäfer <sc...@thomas-daily.de>

> Thomas Mäder schrieb:
>
>
>  I seem to remember that there was a way to force Wicket to always
>> serialize
>> pages on detach in order to make sure every page is serializable during
>> development. Can someone please point me to the FM so I can read it?
>> Searching Nabble & Google didn't turn up anything.
>>
>
> one guy once posted this one:
>
>
> <snip>

Re: Always serialize pages for debug purposes

Posted by Uwe Schäfer <sc...@thomas-daily.de>.
Thomas Mäder schrieb:

> I seem to remember that there was a way to force Wicket to always serialize
> pages on detach in order to make sure every page is serializable during
> development. Can someone please point me to the FM so I can read it?
> Searching Nabble & Google didn't turn up anything.

one guy once posted this one:

class PickyHttpSessionStore extends HttpSessionStore
     {
         /**
          * @param application
          */
         public PickyHttpSessionStore(final Application application)
         {
             super(application);
         }

         @Override
         public void setAttribute(final Request request, final String 
name, final Object value)
         {
             try
             {
                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 ObjectOutputStream stream = new ObjectOutputStream(baos);
                 stream.writeObject(value);
                 stream.close();

		super.setAttribute(request, name, value);
             }
             catch (Throwable exception)
             {
                 String s = "Unable to serialize value: " + 
value.toString();
                 System.err.println(s);
                 System.err.println(exception);
                 throw new RuntimeException(s, exception);
             }

         }
     }

-- 

THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 0
F  + 49 761 3 85 59 550
E  schaefer@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947

Registrieren Sie sich unter http://morningnews.thomas-daily.de für die 
kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages 
morgens um 9:00 in Ihrer Mailbox.

Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 
8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 
16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer 
Redaktion lautet redaktion@thomas-daily.de.


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