allwiki首页  
天下维客 你可以修改的网络知识库
首页最近更改优秀条目专题展示电脑科技词典软件学习网络知识电脑安全明星时尚天下百科
 

EJB Development Quickstart with MyEclipse---3

天下维客,你可以修改的网络知识库

Jump to: navigation, search

Creating an EJB Project

This section introduces the steps for creating an example EJB Project named "firstejb".


  • From the Eclipse menubar select File > New > Project... to open the New Project Wizard.
  • In New Project Wizard expand the J2EE folder and select EJB Project (see Figure 2)
  • Select Next >.


Image:firstejb-newejbproject-page1.gif



Figure 2. Opening EJB Project wizard


  • Enter firstejb into the Project Name field
  • Select J2EE 1.3 option for Specification Level.


The remaining fields are prepopulated from the MyEclipse EJB Project Template. This template is defined under the MyEclipse J2EE Project preferences. Table-1 describes each of the fields for the New J2EE EJB Project wizard shown in Figure 3.



Image:firstejb-newejbproject-page2-annot.gif



Figure 3. New EJB Project creation details



Table 1. New EJB Project wizard field definitions



Image:EJB-tab-2.gif


  • Select Finish


Completing the wizard creates and configures the firstejb EJB Project. Figure 5 depicts the structure of the new project from the MyEclipse perspective. To open the MyEclipse perspective, from the MyEclipse menubar select Window > Open Perspective > Other and select the MyEclipse perspective,Image:Logo.gi. The Java Package Explorer will be automatically opened as part of the perspective. However, if you close it for some reason, you can manually reopen it by selecting Window > Show View > Java > Package Explorer.



Figure 4 depicts the new EJB project structure. Newly created EJB projects will not include a default ejb-jar.xml file. There are 2 reasons for this: 1) the deployment descriptor will be created later using XDoclet technology and 2) a valid ejb-jar.xml file requires at least 1 EJB definition. At this point in the process, no EJB's exist and a corresponding ejb-jar.xml file would appear in your project with an error marker as a result. The alternative is a simple warning message in the Problems view that identifies that the required ejb-jar.xml deployment descriptor does not yet exist in your project. This file will be created later in this tutorial.



Image:firstejb-projectlayout-annot.gif



Figure 4. EJB Project layout

Personal tools
工具
金银币拍卖 金币拍卖预展  金银币网店 熊猫金银币 生肖金银币