我从来没有考虑过这个问题,不过昨天遇到的问题其中有一个就是这个。
代码中调用了无状态Session Bean的remove方法,按照在TSS上的一个讨论的内容看,这个remove方法就是告诉服务器可以把那个Bean重新放到Bean的池子里面,但是其实没有必要,因为一般你的调用结束后服务器自然知道并把那个Bean放回池子。

原文如下:
The app server doesnt have to know anything from the client from the remove() operation, because after each and every method call, the bean is decoupled from the client. We had this discussion with SUN during the branding process and they confirmed that the remove() operation is a no-op on a stateless bean. Can you even fathom for me what remove() might do? According to the lifecycle, the bean goes in the pool immediately after it finishes running, so by the time you call remove() as per the spec, the bean must already be in the pool.

Trust me it does nothing. Read the generated stub source for your app server. Youll see.

(Visited 158 times, 1 visits today)