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

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

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

    posts - 4,  comments - 9,  trackbacks - 0
    默認的JNDI命名規(guī)則前面已經(jīng)介紹過,但有些情況下需要自定義名稱。要自定義JNDI名稱,可以使用
    @LocalBinding 和 @RemoteBinding 注釋,@LocalBinding注釋指定Session Bean的Local接口的JNDI名稱,
    @RemoteBinding注釋指定Session Bean的Remote接口的JNDI名稱,下面的代碼展示了如何自定義JNDI名:
    //author:lihuoming
    package com.foshanshop.ejb3.impl;
    import javax.ejb.Local;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    import com.foshanshop.ejb3.LocalOperation;
    import com.foshanshop.ejb3.Operation;
    import org.jboss.annotation.ejb.LocalBinding;
    import org.jboss.annotation.ejb.RemoteBinding;
    @Stateless
    @Remote ({Operation.class})
    @RemoteBinding (jndiBinding="foshanshop/RemoteOperation")
    @Local ({LocalOperation.class})
    @LocalBinding (jndiBinding="foshanshop/LocalOperation")
    public class OperationBean implements Operation, LocalOperation {
    private int total = 0;
    private int addresult = 0;
    public int Add(int a, int b) {
    addresult = a + b;
    return addresult;
    }
    public int getResult() {
    total += addresult;
    return total;
    }
    }
    在JSP客戶端調用上面EJB的代碼片斷如下:
    InitialContext ctx = new InitialContext(props);
    Operation operation = (Operation) ctx.lookup("foshanshop/RemoteOperation");
    posted on 2006-11-01 22:57 凌宇 閱讀(247) 評論(0)  編輯  收藏

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


    網(wǎng)站導航:
     
    <2025年7月>
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789

    常用鏈接

    留言簿(3)

    隨筆檔案(3)

    文章檔案(14)

    相冊

    收藏夾

    Java

    最新隨筆

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 黄页网站在线免费观看| 亚洲成AV人片天堂网无码| 亚洲一区中文字幕在线电影网| 18禁在线无遮挡免费观看网站| 国产偷窥女洗浴在线观看亚洲| 青青草国产免费国产是公开| 又爽又高潮的BB视频免费看| 国产精品亚洲av色欲三区| 午夜小视频免费观看| 亚洲AV香蕉一区区二区三区| 色吊丝最新永久免费观看网站| 亚洲aⅴ天堂av天堂无码麻豆 | 成人免费在线视频| 亚洲精品精华液一区二区 | 亚洲国产精品无码久久久不卡| 9久热这里只有精品免费 | 亚洲国产精品专区| 免费看韩国黄a片在线观看| 亚洲熟妇AV日韩熟妇在线| 国产美女精品久久久久久久免费| 精品亚洲视频在线| 久久久久亚洲AV无码专区网站| 99久久99这里只有免费的精品 | 免费一本色道久久一区| 精品在线观看免费| 亚洲小说区图片区另类春色| 久久大香香蕉国产免费网站 | xxxxx免费视频| 亚洲AV无码国产一区二区三区| 亚洲AV中文无码乱人伦在线视色| 国产乱子伦精品免费视频| 亚洲AV日韩精品久久久久 | 少妇亚洲免费精品| 久久精品免费视频观看| 亚洲H在线播放在线观看H| 又黄又爽一线毛片免费观看 | 久久精品国产亚洲av麻豆| 啦啦啦中文在线观看电视剧免费版| 国产精品亚洲专区一区| 亚洲av中文无码乱人伦在线播放 | 久久性生大片免费观看性|