數據加載中……
          create EAR project in glassfish bundle for eclipse
          The following tutorial should explain how to build your own JEE Web/EJB Project in Eclipse. I use Glassfish Tools Bundle for Eclipase 1.1, which contain glassfish applicatin server and eclipase 3.4 IDE.

          Finally our project consits of three modules.

          1. EJB module with the  workflow components and also webservices
          2. Web module which contains the business logic of our business process. Things like forms and search pages
          3. EAR module which fits all together an represents the deployment unit which we will provide to our system integrator.
          Start your Eclipse Workbench:


          Build the EJB Module :
          start using the first Eclipse JEE Wizard -> create EJB module

          then enter your project name and check on the "EAR member", click next

          from next wizard page, choose if to create a EJB  client JAR module and click finish.


          Now  your Workspace structure should look like this:


          ejb-jar.xml

          The ejb-jar.xml deployment descriptor is used to provide unique names of the workflow ejb components. As the ejbs in JEE 5 use annotations to declare there behaviour there is no need for an ejb deployment descriptor. But when you plan to develop more then one application the names of the EJB need to be unique.

          sun-ejb-jar.xml

          The  sun-ejb-jar.xml descriptor is the glassfish specific descriptor.


          Build the Web Module

          Now we can create our web project were we put in all our application logic. Start again the Eclipse New-Project-Wizard and select "Web->dynamic web module



          click finish, you will get:


          Notice that the web project is already added to as a EAR module.
          now, you can develop your EJB module and WEB module. After you finish your coding, you can deploy them. It is very simple to do this, just right click the MyFistAppEar project and choose "run on server":

          then you can directly choose "finish" on following wizard page:

          the myFirstAppEAR will be automatically deployed to glassfish application server.
          Hope from console window, you can see following message that prove your deployment is done correctly.
          deploy:
               [exec] Command deploy executed successfully.
          deploy-url-message:
               [echo] Application Deployed at: http://localhost:8082/myFirstAppEAR


          Let us go to glassfish admin console to see what happen on the application server:

          and you will see glassfish admin web page:
          -->input username admin and password "adminadmin"
          -->choose the "Enterprise Application" in the left menu bar
          you will see  that myFirstAppEAR is in the list on the right window like following:

          click the "myFirstAppEAR", you can see more detail, like EJB module and WEB module in it.

          posted on 2009-09-19 11:01 yellowstone 閱讀(619) 評論(0)  編輯  收藏 所屬分類: JAVA EE - EJB - GLASSFISH


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


          網站導航:
          博客園   IT新聞   Chat2DB   C++博客   博問  
           
          主站蜘蛛池模板: 鹤壁市| 建阳市| 兴安县| 天等县| 江北区| 梁山县| 蒲江县| 上虞市| 宿松县| 阜南县| 夏河县| 临夏市| 长阳| 秦皇岛市| 金山区| 南宫市| 蛟河市| 阿鲁科尔沁旗| 黎城县| 定襄县| 柳林县| 德令哈市| 元氏县| 伽师县| 营口市| 隆回县| 威海市| 奇台县| 颍上县| 云安县| 嘉荫县| 蒙阴县| 凤庆县| 吐鲁番市| 彭泽县| 枣庄市| 双柏县| 塘沽区| 阜宁县| 安远县| 信丰县|