Timeout for a Bean Session?

For my JavaScript web app, the backend is a JBoss app server.
JavaScript frontend support ALWAYS ONE (front controller).
The servlet does ONE lookup (plus "narrow") at login time.
This search is an SFSB (Stateful Session Bean) search.
The result of this search is stored in the HttpSession object.
All subsequent communication between the servlet and the SFSB is handled by this persistent remote object.

Session timeout (for HttpSession object) from JBossWeb (Tomcat) is 30 minutes.
So every time there is NO activity on the interface (> 30 minutes), the session expires, the session with everything in it - also the SFSB remote interface - is dropped.

In the meantime SFSB is passivated to disk (deploy / ejb3-interceptors-aop.xml -> idleTimeoutSeconds = 300).

The default timeout for my SFSB is infinite (removeTimeoutSeconds = 0). So it is set by default that the passive sfsb is automatically deleted.

Is there any reason for not setting the SFSB timeout (removeTimeoutSeconds) to 30 minutes (30 * 60) in my case (same as the session timeout)?

+3


source to share


1 answer


The only exception is long background transactional processes associated with the state of the bean. If it takes longer than the specified duration to complete, this will throw an exception, probably the transaction is not active.



Therefore, even if there is a timeout in the interface, the background process should end. In this case, the delete timeout may affect processing and should be changed accordingly.

0


source







All Articles