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

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

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

    kapok

    垃圾桶,嘿嘿,我藏的這么深你們還能找到啊,真牛!

      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      455 隨筆 :: 0 文章 :: 76 評論 :: 0 Trackbacks

    http://www.jroller.com/page/raghukodali/Weblog/testing_ejb_3_0_beans?catname=
    Testing EJB 3.0 beans outside the container

    Unit testing EJBs is one of the pain points that made EJBs less popular with developers. It is not easy to have a serious Test Driven Development (TDD) with EJBs developed with specifications before EJB 3.0. One of the goals mentioned in the EJB 3.0 specification is "Improved ability for testing outside the container". Although there have been some frameworks which allowed to test outside the container, but having the spec support this feature will definitely provide more out-of-box experience and closely match with what is going to be finally deployed into the runtime.

    As of today only Oracle EJB3.0 Container provides the facility of testing EJBs outside the container. I am sure we will see other containers do this as well in the future.
    You can check out the whitepaper about Out-of-Container testing and the sample that comes as a demo with the container.
    If you are using one of the IDE's like JDeveloper, you can integrate the TDD approach to EJB3.0 with few simple steps. Following are the steps, I took to make the sample that comes with Oracle EJB3.0 Container work in the IDE (Oracle JDeveloper 10.1.3 Preview release). EJB3_HOME refers to the directory where you have installed the Oracle EJB3.0 Container, and JDEV_HOME refers to the directory where you have installed JDeveloper.


    • If you haven't installed JDeveloper 10.1.3 preview release, download and install
    • Launch JDeveloper
    • From the Help menu, select "Check for Updates" option
    • Install JUnit extension (If you haven't done before), this option is shown as JUnit 10.1.3.3.51.2 in Step 2 of the wizard
    • Create a a brand new application with an empty project (File |New)
    • Make the following changes to the project properties (Double-click on the project)

      • Select Project Content, add an entry for the Java Content that points to the sample. EJB3_HOME/demo/howtoejb30outofcontainer/src
      • Select Libraries, change the J2SE version to point to JDK 1.5.x
      • You will have to add the following jar files
        ejb30.jar (EJB3_HOME/j2ee/home/lib/ejb30.jar)
        ectest.jar (EJB3_HOME/toplink/jlib/ectest.jar)
        toplink.jar (EJB3_HOME/toplink/jlib/toplink.jar)
        bcel.jar (EJB3_HOME/j2ee/home/lib/bcel.jar)
        jakarta-regexp-1.3.jar (EJB3_HOME/toplink/jlib/jakarta-regexp-1.3.jar

      • Add the following libraries as well (Click on Add Library button)
        J2EE
        JUnit Runtime
        Oracle JDBC
        Oracle XML Parser V2

      • Select Run/Debug, in the Java Options enter Djava.persistence.setup.config=examples.ejb.cmp30.relationships.OrderDemoSessionConfig javaagent:$EJB3_HOME/toplink/jlib/ectest.jar (substitute $EJB3_HOME to installed directory). Enter examples.ejb.cmp30.relationships.OrderDemoSessionJunitTest as Program arguments

    • Click OK to close the project properties
    • Make necessaries changes to OrderDemoSessionConfig.java as detailed in the following how-to document.
    • Compile the project
    • Select OrderDemoSessionJunitTest.java, right mouse and choose Run.
    • You will see a new tab JUnit TestRunner in the log window with test results

    You can follow similar steps for the new EJBs that you want to develop and test with EJB3.0 specification


    -raghu

    ( Mar 28 2005, 10:36:23 AM PST ) Permalink Comments [0]

    Trackback URL: http://jroller.com/trackback/raghukodali/Weblog/testing_ejb_3_0_beans
    posted on 2005-04-11 08:47 笨笨 閱讀(369) 評論(0)  編輯  收藏 所屬分類: J2EEALL
    主站蜘蛛池模板: 99爱免费观看视频在线| 亚洲AV无码国产精品色| 亚洲第一综合天堂另类专| 日本高清免费不卡在线| 国产成人亚洲综合一区| 国产又黄又爽又猛免费app| 亚洲视频免费在线看| 女人18毛片特级一级免费视频 | a级片免费在线播放| 亚洲女同成人AⅤ人片在线观看| 久久久久国色av免费看| 亚洲国产成人精品无码区花野真一 | 四虎www成人影院免费观看| 波霸在线精品视频免费观看| 亚洲Av无码一区二区二三区| 亚洲一级片免费看| 成人精品视频99在线观看免费| 亚洲第一页在线播放| 久久亚洲中文字幕精品一区四| 日本片免费观看一区二区| 亚洲国产超清无码专区| 日韩欧美一区二区三区免费观看| 亚洲熟妇少妇任你躁在线观看| 亚洲乱码一区二区三区在线观看 | eeuss免费天堂影院| tom影院亚洲国产一区二区| 国产aⅴ无码专区亚洲av麻豆| 99久久99这里只有免费的精品 | 永久免费av无码网站韩国毛片| 成在线人免费无码高潮喷水| 亚洲国产精品无码久久久秋霞1| 亚洲国产人成网站在线电影动漫| 亚洲一级毛片免费看| 国产成人无码精品久久久久免费| 国产精品亚洲综合五月天| 亚洲av午夜福利精品一区| 99re热免费精品视频观看| 国产精品99精品久久免费| 国产精品永久免费视频| 瑟瑟网站免费网站入口| 国产91成人精品亚洲精品|