|
||||||||
Creating EJB using Eclipse (with GlassFish pluggin) -- Creating a Enterprise Application Project
see http://www.webagesolutions.com/knowledgebase/javakb/jkb005/index.html
and http://www.myeclipseide.com/documentation/quickstarts/earprojects/
1) Create Enterprise Application Project (will include EJB)
File->New -> Enterprise Application Project
Click on the NEXT and on following screen choose "New Module" CHOOSE only the modules you want to create (EJB, client, Webapp, connector)
Select the modules you just created and Hit Finish The results (I did 4 modules) is a new project in Eclipse for each module-- I have one for EJB, Webapp,
<< 4 Projects created Test_Eclispe_GlassFish_EAR_*
2) Configure the Test*_EAR_ProjectWeb project so that the EE Web Application will include the EJB project code we setup in step 1Right Click on Test*_EAR_ProjectWeb -> properties
<<<< Select "ADD"
You will get
<<<Select Project and hit Next
You will get the following, SELECT the EJB project created in step 1, then Click FINISH
<< The result is that the deployment assembly points to EJB project
Creates a Top "Test*_EAR_Project" project that integrates the different components of this Enterprise Application Project<<This new project has the 4 modules in it
3)Lets create a new EJB in my Test_Eclipse_GlassFish_EAR_ProjectEJB created in step 1
Example going to create a new EJB Session class called MySessionEBJ Right Click on EJB project folder -> New -> Other->EJB->Session Bean Fill in information about your EJB Session bean
Here is the result of adding this Session Bean to the Project...NOTE IT SHOWS UP UNDER SESSION BEANS
|
||||||||
© Lynne Grewe |