Hi,

Created a ticket: https://issues.apache.org/jira/browse/WICKET-4165

It is now marked as major because I forgot to change priority to minor.
Not at all a showstopper by any means.

Regards,
Mikko Pukki

-----Original Message-----
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: 24. lokakuuta 2011 16:25
To: users@wicket.apache.org
Subject: Re: Wicket 1.5.2 HttpSessionDataStore cannot store pages with default 
store settings

Hi,

On Mon, Oct 24, 2011 at 3:16 PM, Mikko Pukki
<mikko.pu...@syncrontech.com> wrote:
> Hi all,
>
> Just noticed that when using HttpSessionDataStore pages are not saved.
> This happens when Wicket-PageSavingThread 
> (org.apache.wicket.pageStore.AsynchronousDataStore)
> tries to store entry's data to the dataStore. In this case store happens to 
> be HttpSessionDataStore.
>
> When trying to get pageTable at 
> org.apache.wicket.pageStore.memory.HttpSessionDataStore:138
> Session.exists() returns always false. It seems that code in 
> HttpSessionDataStore
> expects the call for storing the page coming from user's thread that has 
> correct threadLocal?
>
> The error that is printed to the log goes something like:
> "ERROR - HttpSessionDataStore       - Cannot store the data for page with id 
> '0' in session with id '1x6veaq6f0b23trchiio53f3g'"
>
> Store is created pretty much the way it is described in 
> HttpSessionDataStore's javadocs:
>
>                             setPageManagerProvider(new 
> DefaultPageManagerProvider(this) {
>
>                                                          @Override
>                                                          protected IDataStore 
> newDataStore()
>                                                          {
>                                                                               
>         return new HttpSessionDataStore(new DefaultPageManagerContext(), new 
> PageNumberEvictionStrategy(12));
>                                                          }
>                             });
>
> Problem goes away by setting  to synchronous action by: 
> getStoreSettings().setAsynchronous(false);
>
> Now the question is this the correct way to avoid this problem? Or should 
> asynchronous saving work also with HttpSessionDataStore?
> So is this a bug and should I open jira issue and provide quickstart 
> demonstrating the problem?

The problem is clear.
Indeed HttpSessionDataStore is not intended to be used asynchronously.
The AsynchronousDataStore is used to detach the http worker thread
from the actual write of the page's bytes in slower data stores like
DiskDataStore.

Anyway, please create a ticket. No errors should happen by just
changing the settings.

>
> Regards,
> Mikko Pukki
>



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

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

Reply via email to