數據加載中……
          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


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


          網站導航:
           
          主站蜘蛛池模板: 澄城县| 周宁县| 桐城市| 偏关县| 澜沧| 婺源县| 南郑县| 襄汾县| 卫辉市| 鹿泉市| 阳谷县| 乐山市| 冷水江市| 台江县| 思茅市| 从江县| 腾冲县| 十堰市| 邳州市| 开鲁县| 湾仔区| 富川| 来凤县| 和林格尔县| 新平| 南华县| 康平县| 岳池县| 汾西县| 蓬莱市| 囊谦县| 乌拉特前旗| 常宁市| 六盘水市| 龙江县| 内黄县| 紫金县| 额济纳旗| 徐汇区| 绥化市| 鄂托克旗|