Hi there,in a user management application, I am trying to develop the traditional "disconect this user" option for the site administrator.I store all user session EJBs (its local interface) in a ArrayList and when the admin wants to disconnect someone I remove the interface and invoke its remove() method.I suppoused that this would make that Session EJB be removed from the container, but the user that has a pointer to it can still access normally.Any ideas on how can I make the container destroy a certain EJB making any invocation to any of its method throw an exception?

You mention that you have a reference to a localinterface of a session bean. Is this session beanstateful or stateless?

If the session bean is stateless, then callingremove on the local (proxy) interface only servesto invalidate that one proxy. This does not callthe ejbRemove() on an actual bean instance sincethat proxy is *not* associated with a specific beaninstance.

The bean container decides when to call ejbRemove()when it determines it needs more resources or ittimes out.

If the session bean is stateful, then calling removeon the local (proxy) interface should cause theejbRemove() of the actual bean instance for which itis associated to be called and thus destroyed.

If a user were to have a duplicate reference to thestateful proxy, then it should get a RemoteExceptionwhen invoking a method on the now destroyed beaninstance.