Search code examples
javajbosswicketwicket-6

Wicket application in Jboss: session expires too quickly


I'm running a Wicket 6.x application hosted on a Jboss EAP 6.2 server.

My web.xml file contains:

<session-config>
    <session-timeout>20</session-timeout>
</session-config>

This would suggest a session timeout of 20 minutes. However, the actual timeout is much, much lower. I haven't pinned down a precise timing, but I can tell you that even after only 5 minutes the session is already expired. When I refresh the page, it gets re-initialized and all its state is gone.

Can I make this timeout longer? How is it controlled?


Solution

  • After additional testing, turns out the problem was the timeout time of the EJB pools:

    <pools>
         <bean-instance-pools>
             <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
             <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
         </bean-instance-pools>
    </pools>
    

    Changing the value to 20 minutes solved the problem