I'm learning Ejb 3 from Manning Ejb 3 in action. i have just finished the introductory part and now the author is onto explaining various ejb 3 component types using ACTIONBAZAAR example. i would like to know how to create the example from eclipse. as i digged into eclipse juno, there were option to create EJB PROJECT, dynamic web project. under JavaEE category they have Application Client project, connector project, enterprise application project, utiltiy project.
i got confused and choose enterprise application project , but end result was that i was not able to understand the generated resources which were like this. there was a folder named EarContent, there was deployment desripter and when you expand it , there were bundled libraires and modules. i did not know how to proceed. please help me select correct project type so as to accomplish the ActionBazaar in ejb 3 in action by Manning. Regards
It depends on what chapter you are in. In the early chapters, ActionBazaar is just a web project. In the later chapters, it is an Enterprise application. WHich means you need an enterprise application project first and then an ejb project and web project.
Jeanne Boyarsky wrote:It depends on what chapter you are in. In the early chapters, ActionBazaar is just a web project. In the later chapters, it is an Enterprise application. WHich means you need an enterprise application project first and then an ejb project and web project.
thanks for the reply Jeanne. do you mean to say that i should create enterprise application project and INSIDE it i create new ejb project and web project ? am i right ?
also the generated resources in enterprise application project were folder named EARCONTENT, and Deployment descriptor----modules and Bundled Libraries
how am i supposed to use them ? Please help
also, was just playing around with eclipse and noticed a option EAR MEMBERSHIP - ADD PROJECTS TO EAR. does it mean that suppose i first create a ejb project like new > ejb project and then add this ejb project to an existing(but empty) EAR project. similarly i create web project and add it to EAR ? ?
what i did is created a new entrprise application project, and then it gave me option to ADD MODULES. i added web module and ejb module. when i clicked on finished, it resulted in one Ear Project which i named ActionBazaar, one Web module ActionBazaarWeb, and ActionBazaarEjb. am i proceeding right ? if yes , then suppose i have to call my session bean( which is in ActionBazaarEjb) from a servlet in ActionBazaarWeb, then will i be able to call it , since they are two separate(but linked projects through EAR) projets in workspace ? guide me if am proceding in right direction ?
also i again created a new Enterprise application project in eclipse juno, and following is the artifact structure in the workbench
maybe we could rename EarContent, so that you may have different name. but this is the structure am getting when i do New > Enterprise Application Project
also i digged into eclipse help and it says that there is no source code in Enterprise Application Project( which eclipse also calls EAR project) and that it references other jee projects which can be application client projects, ejb modules, web modules.
actually i'm in the early stages of book, but the book didn't mentioned which project to create. it simply gave a session bean source code and a servlet source code. i want to try the example at the earliest in Eclipse. so i would like to know which project to create. my friend told me that i can create a web project and in it add session bean . is it a possible ?