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 閱讀(246) 評論(0)  編輯  收藏
          主站蜘蛛池模板: 舟曲县| 松滋市| 靖远县| 潞西市| 德州市| 大冶市| 阿坝县| 旬阳县| 湘潭县| 石嘴山市| 塘沽区| 河北区| 霍林郭勒市| 通城县| 汤阴县| 阳曲县| 财经| 宁远县| 白沙| 高淳县| 中西区| 汉沽区| 阿拉善左旗| 馆陶县| 阳原县| 遂川县| 阳朔县| 永寿县| 聂拉木县| 巧家县| 镇坪县| 都江堰市| 木里| 昌黎县| 中宁县| 福贡县| 襄樊市| 安溪县| 武邑县| 三穗县| 永丰县|