Hi,

I'd suggest to try the following:

 setPageManagerProvider(new DefaultPageManagerProvider(this){
                        @Override
                        protected IDataStore newDataStore() {
                                return new
HttpSessionDataStore(getPageManagerContext(),
new
PageNumberEvictionStrategy(100)) {

    @Override

public void storeData(String sessionId, int pageId, byte[] pageAsBytes)
{
    super.storeData(sessionId, pageId, pageAsBytes);
*    pageManagerContext.setSessionAttribute("timestamps", new
java.util.Date());*
}

};
                        }
                });

The idea is to put some something in the session that marks it as
touched/dirty.
I have seen such behavior with Jetty's JdbcSessionStore - it will serialize
the session to the RDBMS only if it sees that there is something changed in
it.

Additionally I'd suggest to extend HttpSessionDataStore and put logging in
all its methods. Unfortunately it doesn't have much logging at the moment.


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Feb 17, 2016 at 12:39 AM, mashleyttu <mash...@gmail.com> wrote:

> Hi Everyone, Over the weekend we clustered our Wicket 6 application in
> AWS/Tomcat. Since AWS doesn't support multicasting we used an AWS Load
> Balancer and the tomcat memcached-session-manager with sticky
> sessions=false, sessionbackupasync=false and lockingmode=all.
>
> We changed our wicket configuration to the following:
>         @Override
>         public void init(){
>                 super.init();
>
> getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER);
>
>                 //Store previous Pages in HttpSession instead of on local
> disk for
> clustering.
>                 setPageManagerProvider(new
> DefaultPageManagerProvider(this){
>                         @Override
>                         protected IDataStore newDataStore() {
>                                 return new
> HttpSessionDataStore(getPageManagerContext(), new
> PageNumberEvictionStrategy(100));
>                         }
>                 });
>
> We are able to navigate from page-to-page (each request going to a
> different
> node) without losing our session (user doesn't get logged out) and we
> aren't
> receiving any page expired exceptions.
>
> The component not found exception occurs every time there is an ajax call
> that goes to a different node than the node that first rendered the page.
>
> I know no one here is a tomcat memcached session manager expert, so my
> question is:
>
> from a Wicket perspective is there anything else that needs to be
> configured
> to ensure that everything is stored in the session?
>
> Although, we can turn on sticky sessions, we really only want to do that is
> a last resort.
>
> Thanks for any advice that can be given!
> Matt
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Clustering-Component-Not-Found-Exception-tp4673610.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to