The client must request the remove the SFSB, e.g. if the client is logged out.
In this case the container will call the @Remove method.
Thanks for your reply. But I do not understand it. Could you explain me further?
You talk about a Stateful SessionBean, in opposition to a StatelessSessionBean where the remove method is called only if the container decide to destroy the bean and not pool it, a StatefulSession is hold as long as the client does not call the remove.
The StatefulSession is connected/controlled by a single client. After a time the bean will be passivated (e.g. serialized to disk) and there is a treshold after that the bean will be destroyed by the container, in this case the remove method will be called also.
I have the same need as Eric, call the remove() of SFSB, but our container was configed with <cache-policy>org.jboss.ejb.plugins.NoPassivationCachePolicy</cache-policy>, according to jboss doc, we need to remove the bean instance explicitly.
not try the user log out, is there any other way I can used to remove the SFSB ?
There should be a configurable timeout to remove such forgotten SFSB's. But this should be an exception normally the client should call the remove method.
I'm not sure where to configure this right now