I believe to have read that RunTimeExceptions raised from session beans do not propagate as-is to client;and cause beans to be removed from the pool and obliterated.
We have a stateless session bean throwing an IllegalArgumentException.
This get wrapped as EJBException at the client which is as expected.
However,we do not see the bean instance being discarded from the pool ( ejbremove is not invoked).
I would have expected the ejbremove to have been invoked for this bean instance.
THe pooling parameters are:
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>50</max-beans-in-free-pool>
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
</pool>
</stateless-session-descriptor>