I am quite new to EJB's and J2EE in general so apologies if parts or
all of my question below does not make sense.

I read that when the client calls remove() on the EJBObject, it's not
delegated to the ejbRemove() of the stateless session bean (SLSB). The
bean is simply placed back in the pool. The container calls
ejbRemove() when it deems to necessary to destroy a SLSB to reduce the
number of beans in the pool.

I also read that it is often a good idea to cache home references on
the client in order to prevent costly JNDI lookups for the same bean,
and that both home and remote references are shareable and thread-

What I don't understand from these two statements above is, what
happens to the local references if EJB container decides to call
ejbRemove for some reason (like an inactivity of a client on an EJB?).

Could someone shed some light?