80 Chapter 4 A client s session duration could (Web site templates)
Friday, November 30th, 200780 Chapter 4 A client s session duration could be as long as a browser window is open, perhaps connecting to an e-commerce site with deployed session beans. It could also be as long as your Java applet is running, as long as a standalone application is open, or as long as another bean is using your bean. The length of the client s session generally determines how long a session bean is in use that is where the term session bean originated. The EJB container is empowered to destroy session beans if clients time out. If your client code is using your beans for 10 minutes, your session beans might live for minutes or hours, but probably not weeks, months, or years. Typically session beans do not survive application server crashes, nor do they survive machine crashes. They are in-memory objects that live and die with their surrounding environments. In contrast, entity beans can live for months or even years because entity beans are persistent objects. Entity beans are part of a durable, permanent storage, such as a database. Entity beans can be constructed in memory from database data, and they can survive for long periods of time. Session beans are nonpersistent. This means that session beans are not saved to permanent storage, whereas entity beans are. Note that session beans can perform database operations, but the session bean itself is not a persistent object. Session Bean Subtypes All enterprise beans hold conversations with clients at some level. A conversation is an interaction between a client and a bean, and it is composed of a number of method calls between the client and the bean. A conversation spans a business process for the client, such as configuring a frame-relay switch, purchasing goods over the Internet, or entering information about a new customer. The two subtypes of session beans are stateful session beans and stateless session beans. Each is used to model different types of these conversations. Stateful Session Beans Some business processes are naturally drawn-out conversations over several requests. An example is an e-commerce Web store. As a user peruses an online e-commerce Web site, the user can add products to the online shopping cart. Each time the user adds a product, we perform another request. The consequence of such a business process is that the components must track the user s state (such as a shopping cart state) from request to request.
Don’t want to have just any web hosting, but web hosting provider who will share the same beliefs? You have found them. Our Church Web Hosting company will treat in you in appropriate way, the one you are accustomed to.