You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris Colman <ch...@stepaheadsoftware.com> on 2011/10/05 08:52:39 UTC

Is it possible to turn off page serialization in 1.5?

In 1.4 we had used:
 
getPageSettings().setAutomaticMultiWindowSupport(false);
 
and everything worked perfectly without making any of our model objects
serializable.
 
With 1.5 that method is no longer available and it's causing us to make
the model object serializable but that's causing a few problems of it's
own ;)
 
Is there a way to turn of page serialization in 1.5?
 
Regards,
Chris

RE: Is it possible to turn off page serialization in 1.5?

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
I just turned off serializing using:

private class NullPageManagerProvider implements IPageManagerProvider
{
	public IPageManager get(IPageManagerContext context)
	{
		return new NullPageManager(context);
	}
}

But now the back button goes back one page only.

Is it possible to turn of serialization of the page but still keep a
'history' of pages visited so that back works correctly?

In 1.4.* I was not serializing pages but back/history still worked fine.

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


Re: Is it possible to turn off page serialization in 1.5?

Posted by Nelson Segura <ns...@gmail.com>.
We dont use clustering either. Most of our objects are serializable,
but I am thinking on turning off the page store. What will the effects
of turning off versioning in the IPageManager. I never had conscious
use for the page store. What will I miss?

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


RE: Is it possible to turn off page serialization in 1.5?

Posted by Chris Colman <ch...@stepaheadsoftware.com>.

>-----Original Message-----
>From: Johan Compagner [mailto:jcompagner@gmail.com]
>Sent: Thursday, 6 October 2011 12:46 AM
>To: users@wicket.apache.org
>Subject: Re: Is it possible to turn off page serialization in 1.5?
>
>no we didn't use the diskpage store and so on
>We still used what wicket did have before that, so with the Change
>recorder and so on.
>
>That works for us. Yes our pages are not serializable but for our
>clustering we have for example Terracotta

Ah Johan, that's a good thought: We were wondering how Terracotta would
work with Wicket. I guess it works well then! I've got some questions
for you that I'll send direct as they aren't wicket related.

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


Re: Is it possible to turn off page serialization in 1.5?

Posted by Johan Compagner <jc...@gmail.com>.
no we didn't use the diskpage store and so on
We still used what wicket did have before that, so with the Change
recorder and so on.

That works for us. Yes our pages are not serializable but for our
clustering we have for example Terracotta



On Wed, Oct 5, 2011 at 15:41, Martin Grigorov <mg...@apache.org> wrote:
> On Wed, Oct 5, 2011 at 4:33 PM, Johan Compagner <jc...@gmail.com> wrote:
>> On Wed, Oct 5, 2011 at 15:21, Martin Grigorov <mg...@apache.org> wrote:
>>> yes. each new page gets its id during construction from the session counter.
>>> if Page#isVersioned() returns 'false' then it will not create new
>>> versions of that page
>>
>> i see that giving a custom IPageManager is also already ok, that has a
>> method supportsVersioning()
>> then it doesn't even matter what the page says.
>>
>> i am also looking into this because we (servoy) has the same problem as Chris
>> our pages are just versionable. And until wicket 1.4 this works fine
>> because of the http store with change recording.
>> But that is now completely gone so or we have to do some major work to
>> get everything serializeable or drop the back button support..
> How did you store non-serializable objects in the http session (http
> store) in 1.4 ?
> The session attributes should be serializable if you need clustering
> and/or session persistence.
> I guess you just didn't use any of these features.
>
> Take a look at https://cwiki.apache.org/confluence/x/qIaoAQ for more
> info about the stores. May be useful.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> 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: Is it possible to turn off page serialization in 1.5?

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
>How did you store non-serializable objects in the http session (http
>store) in 1.4 ?
>The session attributes should be serializable if you need clustering
>and/or session persistence.
>I guess you just didn't use any of these features.

We just have a single server (no clustering) with plenty of memory and
with our particular traffic profile it has never been a problem. As
99.9% of traffic is read-only we decided session persistence is not a
problem.

>
>Take a look at https://cwiki.apache.org/confluence/x/qIaoAQ for more
>info about the stores. May be useful.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
>--
>Martin Grigorov
>jWeekend
>Training, Consulting, Development
>http://jWeekend.com
>
>---------------------------------------------------------------------
>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: Is it possible to turn off page serialization in 1.5?

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 5, 2011 at 4:33 PM, Johan Compagner <jc...@gmail.com> wrote:
> On Wed, Oct 5, 2011 at 15:21, Martin Grigorov <mg...@apache.org> wrote:
>> yes. each new page gets its id during construction from the session counter.
>> if Page#isVersioned() returns 'false' then it will not create new
>> versions of that page
>
> i see that giving a custom IPageManager is also already ok, that has a
> method supportsVersioning()
> then it doesn't even matter what the page says.
>
> i am also looking into this because we (servoy) has the same problem as Chris
> our pages are just versionable. And until wicket 1.4 this works fine
> because of the http store with change recording.
> But that is now completely gone so or we have to do some major work to
> get everything serializeable or drop the back button support..
How did you store non-serializable objects in the http session (http
store) in 1.4 ?
The session attributes should be serializable if you need clustering
and/or session persistence.
I guess you just didn't use any of these features.

Take a look at https://cwiki.apache.org/confluence/x/qIaoAQ for more
info about the stores. May be useful.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Is it possible to turn off page serialization in 1.5?

Posted by Johan Compagner <jc...@gmail.com>.
On Wed, Oct 5, 2011 at 15:21, Martin Grigorov <mg...@apache.org> wrote:
> yes. each new page gets its id during construction from the session counter.
> if Page#isVersioned() returns 'false' then it will not create new
> versions of that page

i see that giving a custom IPageManager is also already ok, that has a
method supportsVersioning()
then it doesn't even matter what the page says.

i am also looking into this because we (servoy) has the same problem as Chris
our pages are just versionable. And until wicket 1.4 this works fine
because of the http store with change recording.
But that is now completely gone so or we have to do some major work to
get everything serializeable or drop the back button support..

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


Re: Is it possible to turn off page serialization in 1.5?

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 5, 2011 at 4:15 PM, Johan Compagner <jc...@gmail.com> wrote:
> But that kills the complete back button support right?
right!
>
> Do pages increment their version then?
yes. each new page gets its id during construction from the session counter.
if Page#isVersioned() returns 'false' then it will not create new
versions of that page
>
>
> On Wed, Oct 5, 2011 at 13:47, Martin Grigorov <mg...@apache.org> wrote:
>> On Wed, Oct 5, 2011 at 2:40 PM, Chris Colman
>> <ch...@stepaheadsoftware.com> wrote:
>>> Our domain model has about 335 persistent classes so that won't be an overnight task ;)
>> I don't remember what exactly #setAutomaticMultiWindowSupport(false)
>> did in 1.4 but its main task for sure wasn't to disabled
>> serialization.
>>
>> In 1.5 there are several approaches to do that.
>> - with IFrameworkSettings#setSerializer() you can setup a ISerializer
>> that is no-op (both directions)
>> - with Application#setPageManagerProvider(IPageManager) you can setup
>> a custom IPageManager that doesn't store pages and returns 'null' when
>> asked for older version
>>>
>>>>-----Original Message-----
>>>>From: Robert Dahlström [mailto:robert.dahlstrom@ongame.com]
>>>>Sent: Wednesday, 5 October 2011 6:24 PM
>>>>To: users@wicket.apache.org
>>>>Subject: Re: Is it possible to turn off page serialization in 1.5?
>>>>
>>>>Why not simply wrap your objects in a LoadableDetachableModel? That way
>>>>you don't need to force serializable objects in your code.
>>>>
>>>>/Rob
>>>>
>>>>On 10/05/2011 08:52 AM, Chris Colman wrote:
>>>>> In 1.4 we had used:
>>>>>
>>>>> getPageSettings().setAutomaticMultiWindowSupport(false);
>>>>>
>>>>> and everything worked perfectly without making any of our model objects
>>>>> serializable.
>>>>>
>>>>> With 1.5 that method is no longer available and it's causing us to make
>>>>> the model object serializable but that's causing a few problems of it's
>>>>> own ;)
>>>>>
>>>>> Is there a way to turn of page serialization in 1.5?
>>>>>
>>>>> Regards,
>>>>> Chris
>>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>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
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Is it possible to turn off page serialization in 1.5?

Posted by Johan Compagner <jc...@gmail.com>.
But that kills the complete back button support right?

Do pages increment their version then?


On Wed, Oct 5, 2011 at 13:47, Martin Grigorov <mg...@apache.org> wrote:
> On Wed, Oct 5, 2011 at 2:40 PM, Chris Colman
> <ch...@stepaheadsoftware.com> wrote:
>> Our domain model has about 335 persistent classes so that won't be an overnight task ;)
> I don't remember what exactly #setAutomaticMultiWindowSupport(false)
> did in 1.4 but its main task for sure wasn't to disabled
> serialization.
>
> In 1.5 there are several approaches to do that.
> - with IFrameworkSettings#setSerializer() you can setup a ISerializer
> that is no-op (both directions)
> - with Application#setPageManagerProvider(IPageManager) you can setup
> a custom IPageManager that doesn't store pages and returns 'null' when
> asked for older version
>>
>>>-----Original Message-----
>>>From: Robert Dahlström [mailto:robert.dahlstrom@ongame.com]
>>>Sent: Wednesday, 5 October 2011 6:24 PM
>>>To: users@wicket.apache.org
>>>Subject: Re: Is it possible to turn off page serialization in 1.5?
>>>
>>>Why not simply wrap your objects in a LoadableDetachableModel? That way
>>>you don't need to force serializable objects in your code.
>>>
>>>/Rob
>>>
>>>On 10/05/2011 08:52 AM, Chris Colman wrote:
>>>> In 1.4 we had used:
>>>>
>>>> getPageSettings().setAutomaticMultiWindowSupport(false);
>>>>
>>>> and everything worked perfectly without making any of our model objects
>>>> serializable.
>>>>
>>>> With 1.5 that method is no longer available and it's causing us to make
>>>> the model object serializable but that's causing a few problems of it's
>>>> own ;)
>>>>
>>>> Is there a way to turn of page serialization in 1.5?
>>>>
>>>> Regards,
>>>> Chris
>>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> 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: Is it possible to turn off page serialization in 1.5?

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Oct 5, 2011 at 2:40 PM, Chris Colman
<ch...@stepaheadsoftware.com> wrote:
> Our domain model has about 335 persistent classes so that won't be an overnight task ;)
I don't remember what exactly #setAutomaticMultiWindowSupport(false)
did in 1.4 but its main task for sure wasn't to disabled
serialization.

In 1.5 there are several approaches to do that.
- with IFrameworkSettings#setSerializer() you can setup a ISerializer
that is no-op (both directions)
- with Application#setPageManagerProvider(IPageManager) you can setup
a custom IPageManager that doesn't store pages and returns 'null' when
asked for older version
>
>>-----Original Message-----
>>From: Robert Dahlström [mailto:robert.dahlstrom@ongame.com]
>>Sent: Wednesday, 5 October 2011 6:24 PM
>>To: users@wicket.apache.org
>>Subject: Re: Is it possible to turn off page serialization in 1.5?
>>
>>Why not simply wrap your objects in a LoadableDetachableModel? That way
>>you don't need to force serializable objects in your code.
>>
>>/Rob
>>
>>On 10/05/2011 08:52 AM, Chris Colman wrote:
>>> In 1.4 we had used:
>>>
>>> getPageSettings().setAutomaticMultiWindowSupport(false);
>>>
>>> and everything worked perfectly without making any of our model objects
>>> serializable.
>>>
>>> With 1.5 that method is no longer available and it's causing us to make
>>> the model object serializable but that's causing a few problems of it's
>>> own ;)
>>>
>>> Is there a way to turn of page serialization in 1.5?
>>>
>>> Regards,
>>> Chris
>>>
>>
>>---------------------------------------------------------------------
>>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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


RE: Is it possible to turn off page serialization in 1.5?

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
Our domain model has about 335 persistent classes so that won't be an overnight task ;)

>-----Original Message-----
>From: Robert Dahlström [mailto:robert.dahlstrom@ongame.com]
>Sent: Wednesday, 5 October 2011 6:24 PM
>To: users@wicket.apache.org
>Subject: Re: Is it possible to turn off page serialization in 1.5?
>
>Why not simply wrap your objects in a LoadableDetachableModel? That way
>you don't need to force serializable objects in your code.
>
>/Rob
>
>On 10/05/2011 08:52 AM, Chris Colman wrote:
>> In 1.4 we had used:
>>
>> getPageSettings().setAutomaticMultiWindowSupport(false);
>>
>> and everything worked perfectly without making any of our model objects
>> serializable.
>>
>> With 1.5 that method is no longer available and it's causing us to make
>> the model object serializable but that's causing a few problems of it's
>> own ;)
>>
>> Is there a way to turn of page serialization in 1.5?
>>
>> Regards,
>> Chris
>>
>
>---------------------------------------------------------------------
>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: Is it possible to turn off page serialization in 1.5?

Posted by Robert Dahlström <ro...@ongame.com>.
Why not simply wrap your objects in a LoadableDetachableModel? That way 
you don't need to force serializable objects in your code.

/Rob

On 10/05/2011 08:52 AM, Chris Colman wrote:
> In 1.4 we had used:
>
> getPageSettings().setAutomaticMultiWindowSupport(false);
>
> and everything worked perfectly without making any of our model objects
> serializable.
>
> With 1.5 that method is no longer available and it's causing us to make
> the model object serializable but that's causing a few problems of it's
> own ;)
>
> Is there a way to turn of page serialization in 1.5?
>
> Regards,
> Chris
>

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