- This topic has 3 replies, 2 voices, and was last updated 20 years, 8 months ago by Scott Anderson.
-
AuthorPosts
-
rockMemberBecause MyEclipseIDE forces you to create an EJB module as a new project, I have to create 5 projects for 5 EJBs (module). In say, EJB A, it depends on code from EJB B. And EJB B depends on code from EJB. Although Eclipse allows you to reference classpath from other project (and therefore, module), when I compile I get this error:
A cycle was detected in the build path of project: EJB A
The project cannot be built until build path errors are resolved.
A cycle was detected in the build path of project: EJB B
The project cannot be built until build path errors are resolved.If I don’t set the required project dependencies, each of those modules will not compile also. How do I solve this?
Also, can I create more than 1 EJBs in the same project using MyEclipseIde? It seems that to use the EAR project, MyEclipseIde forces you to create EJB module and each of those module has to be a different project.
Thanks.
Scott AndersonParticipantRock,
Also, can I create more than 1 EJBs in the same project using MyEclipseIde?
Absolutely you can, which is what I’d certainly recommend in your case. Sounds like one EJB project with all your EJBs in it would work just fine.
It seems that to use the EAR project, MyEclipseIde forces you to create EJB module and each of those module has to be a different project.
Actually, if you look closely you should notice that the EAR project wizard asks you whether or not to create a web and ejb project automatically. You can uncheck those options and simply choose your existing EJB project to associate with the EAR project. Or, you can associate the EJB project after the fact by right-clicking on the EAR project and selecting MyEclipse > Add and Remove Modules…
rockMemberThanks Scott for your reply.
What I ultimately wanted to do was import an existing project that already has 5 EJBs (along with their deployment descriptors and such) and a web module (that has all the correct xml/struts descriptors). It already worked and deploy fine using ANT build scripts. But what I want is to bring the project (1 web war, 5 ejbs, 3 shared util jars) into the MyElipseIde environment so that I can debug native JSPs.
Is there a best way to do this? How would I import those existing (already completely configured) 5 EJBs into the MyEclipseIde Enterprise Application Project?
I have tried to
1. create an EAP project first, along with 1 EJB module project and 1 web module project.
2. And have no clue what to do next.Thanks.
Scott AndersonParticipantRock,
First, keep in mind that our web and ejb projects are set up as an exploded configuration of their corresponding archive types. So, for your EJB’s, you can import all the source for your EJB’s into the ‘src’ directory of the EJB project and place your deployment descriptors into src/META-INF. In the web project, you need to place any Java source in the ‘src’ directory and all web artifacts (jsp’s, html, deployment descriptors) into the appropriate spot under the WebRoot folder.
-
AuthorPosts