Master_T
Master_T

Reputation: 7913

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?

Upvotes: 0

Views: 1171

Answers (2)

DevDio
DevDio

Reputation: 1564

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.

Upvotes: 1

Master_T
Master_T

Reputation: 7913

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

Upvotes: 0

Related Questions