Hi,
Using a LocalThreadPool for stateless session beans in JBoss 5.1.GA seems not to work as expected.
Ejb instances are not pooled in the current thread context; instead an (expensive) instantiation is triggered for each request.
The reason seems to be in the LocalThreadPool.release(BeanContext ctx) which practically always : (if currentBeanContext.get() is not null - this should be always true in the release() method).
Is this a known bug in the LocalThreadPool ?
Regards,
Cosmin
correction:
The reason seems to be in the LocalThreadPool.release(BeanContext ctx) which practically always (if currentBeanContext.get() is not null - this should be always true in the release() method) calls remove(BeanContext)