The default lifetime of a Stateful SessionBean (jboss 2.4.x) is 1800 seconds. After this time jboss removes the bean without calling ejbRemove. You should see an entry in server.log like
[Bean Cache] Removing from cache bean MySessionSB with id = xxxxx - Cache size = 2
[Container factory] Removing from storage bean MySessionSB with id = xxxxx
You can change these settings in standardjboss.xml
<container-name>Standard Stateful SessionBean</container-name>
I have tried by putting 7200 sec like as follows:
but its still passivated and removed after half an hour.
JBoss version is 2.4.3
Please advice !!
Are You shure You changed the container-configuration used for the beans ( for SFSB normally configuration-name "Standard Stateful SessionBean" ) ?
We are using jboss 2.4.3 and it works for us.
The passivation time is configured as
You can find the description of the container-configuration tags in the online manual
In standardjboss.xml..there are two configuration one for Standard Stateful SessionBean and another one is jdk1.2.2 Stateful SessionBean..which has to be modified.
Well now i am modifying both and its seems that after below stated configuration :-
its passivated after 15 minutes but *.ser file is not removed after 1.5 hrs..still I am testing its seems that it will work but to..increase the (time before passivation) passivate time I have to modify this
yes, <max-bean-age> is the time after which the bean can be passivated. But the container looks for beans to passivate every <overager-period> seconds. So You should modify <overager-period> as well. In best case the bean is passivated after <max-bean-age> but in an adverse case the bean may be pssiavted not until <max-bean-age> + <overager-period>
The same is with <max-bean-life> - time after which the bean is ready for removal - and <remover-period> - time after which the container looks for beans to remove. In an adverse case the bean is removed not until <max-bean-life> + <remover-period>
For default the period-times are half the time of the max-bean-age or max-bean-life times.
Hope this helps