If you use polling (with AjaxSelfUpdatingBehavior) then you refresh the
session with every http request.
You can use WebSocket instead. WebSocket connections do not affect the
session lifetime and you can just push a message from the server side once
there is something for the client.

Another solution is to use what Martin Spielmann suggested in the other
thread - invalidate the session yourself when it is just that ajax behavior.
To do it you need to override #updateAjaxAttributes() for this behavior and
add extra request parameter.
Then with IRequestCycleListener you can intercept all requests and if there
is no other request for N seconds then invalidate the session.
You will recognize this behavior's requests by this special extra parameter.

Martin Grigorov
Wicket Training and Consulting

On Thu, Sep 22, 2016 at 3:29 PM, Sandor Feher <sfe...@bluesystem.hu> wrote:

> Hi,
> Tightly coupled with  my previous topic
> <http://apache-wicket.1842946.n4.nabble.com/Handling-
> session-timeout-properly-tp4675541.html>
> I'm looking for  a proper solution for refreshing my panel's model and show
> if it must be showed.
> In a nutshell I have a hibernate entity which handled a spring bean which
> injected into my wicket app.
> There is a notification panel which shows some messages to the users. At
> the
> moment I refresh this panel using AjaxSelfUpdatingBehaviour. This method
> besides costly but ruins my session timeout value too (my idle session
> never
> expires).
> I need a solution to check new messages using my spring bean and notify my
> panel to refresh and show the messages.
> TIA, Sandor
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Refreshing-my-Notification-panel-s-model-tp4675548.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