28.7. Configuring SFSB and Session Timeouts in Red Hat JBoss Enterprise Application Platform 6
It is very important that the timeout for Stateful Session Beans is set higher than the timeout for HTTP Sessions, otherwise SFSB's may time out before the user's HTTP session has ended. JBoss Enterprise Application Platform 6 has a default session bean timeout of 30 minutes, which is configured in
standalone/configuration/standalone.xml (replace standalone.xml with your standalone-full.xml if you use full profile).
The default SFSB timeout can be adjusted by modifying the value of
default-access-timeout in the EJB subsystem subsystem xmlns="urn:jboss:domain:ejb3:1.2":
<subsystem xmlns="urn:jboss:domain:ejb3:1.2"> <session-bean> <stateless> <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/> </stateless> <stateful default-access-timeout="5000" cache-ref="simple"/> <singleton default-access-timeout="5000"/> </session-bean> ... </subsystem>
The default HTTP session timeout can't be modified in EAP 6.
To override default value for your own application, simply include
session-timeout entry in your application's own web.xml:
<session-config> <session-timeout>30</session-timeout> </session-config>