Time-out attributes of EJBs
 Technote (FAQ)
 
Problem
In your scenario, the client gets a handle to a stateless session bean, which acts as a facade that calls several stateless and stateful session beans as a part of the workflow in a transaction aware environment.

So in this case, should the TimeOut attribute of the session be set larger than that of the transaction? Also, should the stateless session bean have a TimeOut set to a much larger value than that of the beans that it calls? If so, what is the optimal max_value for the timeout?

Is there an algorithm that is needed to set the timeout values in the preceding scenario?
 
Solution
There is no simple algorithm that you can apply. In general, the bean timeout would be larger than the individual transaction timeout. In this case, where stateless session bean fronts a group of other session beans, the correct timeout depends on the relationship between the beans. If all of the bean instances are created together and stay together, than all of the beans should have the same timeout. Therefore, everything goes away at about the same time. If, however, the contained beans have a lifecycle that is different than the bean that fronts them, the timeouts should be set appropriately for each individual bean.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > EJB Container
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1083967
IBM Group: Software Group
Modified date: Feb 11, 2003