开发者

Remove stateful EJB bean in client

I'm currently learning EJB and as I under开发者_运维问答stand when client gets a stateful session bean the server keeps it in memory(or passivates it) until the client removes the bean. Pretty simple, except nowhere I have seen any examples of how the client can actually remove the bean. How do you do that other than shutting down your client application? Or do I just have to implement a reset method in all my stateful beans if I want to start over?


If you have a business method that "ends" the flow, annotate it with @Remove. Otherwise provide a "reset()" method with the @Remove annotation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜