http://www.mastertheboss.com/jboss-application-server/47-ejb-session-beans-.html?start=1
HOW DO YOU CONTROL THE TIMEOUT PERIOD ?
Stateful session beans have configurable timeout values which can control the amount of time a bean can remain idle prior to passivation or removal. Notice the @org.jboss.annotation.ejb.cache.simple.CacheConfig annotation. The idleTimeoutSeconds parameter configures the amount of idle time before the bean is passivated and the removalTimeoutSeconds configures the amount of idle time before the bean is permanently removed. For example, in order to set the timeout to 300 seconds:
@CacheConfig (idleTimeoutSeconds=300)
If the timeout is reached and you use the bean, the exception thrown is:
javax.ejb.NoSuchEJBException: Could not find stateful bean: am203n-6zhbku-gw3ysx5p-1-gw3yw2kw-dg

