Stateful session beans

One stateful session bean serves requests for one client only. There is one-to-one mapping between the stateful session bean and the client. Therefore, stateful beans can hold the state data for the client between multiple method calls. In our Course Management application, we could use a stateful bean for holding student data (student profile and courses taken by her/him) after a student logs in. The state maintained by the stateful bean is lost when the server restarts or when the session times out. Since there is one stateful bean per client, using a stateful bean might impact scalability of the application.

We use the @Stateful annotation on the class to mark it as a stateful session bean.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.4.174