<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    敬的世界

    常用鏈接

    統(tǒng)計

    最新評論

    關(guān)于 EJB

    Overview

    EJB consists of a remote interface, a home interface and an EJBimplementation.??

    The remote interface declares business methods that clients of the EJB?may invoke. The remote interface must extend interface javax.ejb.EJBObject. The EJB container generates a class that implements the remote interface.

    The home interface?provides create?methods for creating new EJB instances.?finder methods for finding EJB instance and remove methods fro removing EJB instances.?

    The EJB?container?provides the EJB's runtime environment and life-cycle management.?

    What EJB?Container does ?

    ?The EJB container manages an EJB's client interfactons, method invocations transactions security, exceptions, etc. Clients of an EJB do nnot interact directly with the EJB,Clients access the EJB container to obtain remote references to EJB instances.

    The EJB container also manages the life cycles of its EJBs. EJB containers typically perform pooling of EJB instances to enhance performance. The EJB container also can create new EJB instances and remove existing instances.

    The Methods calls :

    When? a client invokes a create method in the home interface, the EJB container invokes method ejbCreate. The EJB implementation must provide an ejbCreate
    method for each create method declared in the home interface.? The ejbCreate method must have the same number and types of auguments as their corresponding create methods.

    The EJB container invokes method ejbRemove in response to an invocation of method remove in the home interface. The EJB container also may invoke method ejbRemove if the session expires due to lengthy inactivity. Method ejbRemove should free resources the EJB has used.

    The EJB container invokes method ejbPassivate when the container determines that the EJB is no longer needed in memory. The algorithm that the EJB container uses to determine when it should passivate an EJB is application -server dependent . Many application servers enforce a least recently used policy, which? passivated EJBs that clients have not accessed recently.

    When the EJB container passivates an EJB, the container serializes the state of the EJB and removes the EJB from memory.?

    The EJB container invokes method ejbActivate to restore an EJB instance that the container passivated previousy. The EJB container activates an EJB instance if the client assoicated with the EJB instance invokes a business method of that EJB instance.

    The EJB container reads the state information that it saved during passivation and restores the EJB instance in memory.

    EJB Transaction

    The Java 2 Enterprise Edition supports distributed transaction. A distributed transaction is a transaction that includes multiple databases or multiple application servers.? For example , a distributed transaction could transfer funds from an account at one bank into an account at another bank atomically.

    Container Managed Transaction Type

    NotSupported?? Method does not support transactions . The EJB container suspends the existing transaction context if the method is invoked within a transaction context.

    Required????????? Method requires a transaction. The EJB container creates a new transaction if the method is invoked without an existing transaction context and commits the transaction at the end of the method

    Supports?????????? Method supports transactions. The EJB container will not create a new transaction if the methods is invoked without an existing transaction context. but will execute the method as part of an existing transaction context if one is available.

    RequiresNew???Method requires a new transaction. The EJB container suspends the existing transaction context and starts a new transaction if the method is invoked as part of another transaction.

    Mandatory?????? The method must execute in an existing transaction context. The EJB container throws a TransactionRequiredException if the method is invoked without a valid transaction context.

    Never????????????? ?The method must not execute in a transaction context. The EJB container throws a RemoteException if the method is invoked inside a transaction context.

    posted on 2008-10-07 23:09 picture talk 閱讀(133) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 久久久久一级精品亚洲国产成人综合AV区 | 国产成人免费午夜在线观看| 国产亚洲精品不卡在线| 成人无码视频97免费| 久久精品国产亚洲精品| 亚洲精品视频免费观看| 亚洲精品无码激情AV| 日本黄页网址在线看免费不卡| 精品国产免费观看一区| 久久人午夜亚洲精品无码区 | 久久亚洲中文字幕精品一区四| XXX2高清在线观看免费视频| 日本红怡院亚洲红怡院最新| 日本免费中文字幕| 亚洲an日韩专区在线| 四虎影视永久免费视频观看| www成人免费观看网站| 亚洲国产精品lv| 夭天干天天做天天免费看| 一区二区三区免费在线观看| 亚洲欧洲日韩不卡| 日韩免费观看视频| 国产免费爽爽视频在线观看| 亚洲AV无码一区二区三区在线| 国产午夜无码视频免费网站| 国产免费AV片在线观看| 日日摸日日碰夜夜爽亚洲| 亚洲日韩图片专区第1页| 暖暖免费高清日本一区二区三区 | 无码国产精品一区二区免费式影视 | 亚洲国产成人高清在线观看| 成人最新午夜免费视频| 久久久久久免费一区二区三区| 亚洲看片无码在线视频| 久久亚洲精品中文字幕无码| 暖暖在线日本免费中文| 无码一区二区三区AV免费| 久久久久国产精品免费看| 特级毛片免费观看视频| 久久久久亚洲国产| 亚洲一区二区三区免费观看|