Sun River
          Topics about Java SE, Servlet/JSP, JDBC, MultiThread, UML, Design Pattern, CSS, JavaScript, Maven, JBoss, Tomcat, ...
          posts - 78,comments - 0,trackbacks - 0

          --) Life Cycle of a Stateful Session Bean

          The following figure shows the life cycle of a stateful session bean. It has the following states:

          • Does not exist. In this state, the bean instance simply does not exist.
          • Ready state. A bean instance in the ready state is tied to particular client and engaged in a conversation.
          • Passive state. A bean instance in the passive state is passivated to conserve resource.

          The various state transitions as well as the methods available during the various states are discussed below.



          --) Life Cycle of an Entity Bean

          When developing an entity bean you can take advantage of the bean's relationship with the container to execute logic and optimizations outside the context of the bean's core logic. As the container creates and pools an instance, assigns data to it, executes bean methods, and eventually removes the instance, the container provides opportunities for your code to execute. This topic provides an overview of an entity bean's life cycle, pointing out some of these opportunities.

          The following figure shows the life cycle of an entity bean. An entity bean has the following three states:

          • Does not exist. In this state, the bean instance simply does not exist.
          • Pooled state . When WebLogic server is first started, several bean instances are created and placed in the pool. A bean instance in the pooled state is not tied to particular data, that is, it does not correspond to a record in a database table. Additional bean instances can be added to the pool as needed, and a maximum number of instances can be set.
          • Ready state. A bean instance in the ready state is tied to particular data, that is, it represents an instance of an actual business object.

          The various state transitions as well as the methods available during the various states are discussed below.

          posted on 2006-09-18 11:25 Sun River 閱讀(247) 評論(0)  編輯  收藏
          主站蜘蛛池模板: 阳谷县| 唐河县| 万年县| 富川| 元阳县| 新野县| 肃南| 象州县| 邯郸县| 青田县| 临朐县| 临湘市| 彝良县| 高台县| 托克托县| 沂南县| 东莞市| 南城县| 吴江市| 曲周县| 河东区| 纳雍县| 长乐市| 乾安县| 射阳县| 广西| 苍山县| 嫩江县| 萨嘎县| 高唐县| 奎屯市| 邵武市| 星座| 漳平市| 丹棱县| 海晏县| 怀仁县| 南乐县| 靖宇县| 托克托县| 许昌县|