Wicket application in Jboss: session expires too quickly

989 views Asked by At

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?

2

There are 2 answers

0
Master_T On BEST ANSWER

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

0
DevDio On

JBoss 6.x should have default http session timeout set for 30 minutes. Normally, correctly setup web.xml should override the default value.

Try to measure the session timeout when accessing application directly on the JBoss server connector.

https://hostname:8443/app_context_root or http://hostname:8080/app_context_root

Unless you have customized the port, it should be accessible as above.

If you have Apache HTTPD server before the JBoss, and accessing it via the Apache proxy, it will close the session as it is configured in Apache HTTPD. The same applies to any F5 load balancer, and so on.