无状态Session Bean的remove是干嘛的?

我从来没有考虑过这个问题,不过昨天遇到的问题其中有一个就是这个。
代码中调用了无状态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.


作者: Cherami
原载: 无状态Session Bean的remove是干嘛的?
版权所有。转载时必须以链接形式注明作者和原始出处及本声明。

日志评价

1 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 51 Votes | Average: 5 out of 5 (1个投票,平均值: 5,最大值:5) --点击星星直接投票
Loading ... Loading ...


相关日志



随机日志



添加到网摘

[del.icio.us]  [新浪 VIVI]  [365key]  [YouNote]  [博采中心]  [Poco]  [SOHU狐摘]  [天极网摘]  [和讯网摘]
喜欢这个插件?

当前日志信息