facebook

Correct way to include an ejb into a new Project

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #219319 Reply

    Marc Ende
    Member

    Hi,

    I’ve got two projects in Eclipse. The one is named ejbTest and the other is webTest. In ejbTest I’ve creating a stateless sessionbean and from the other I’m trying to access the ejb from the ejbTest. (The interfaces are generated using xdoclet)

    Now I’m trying to use the xdoclet-generated files from the webTest-project. The first try is to include the “Class Folder” in the library path (in Properties->JavaBuildPath).

    It does the job, but is it the correct way?

    Yours sincerly

    marc

    #219323 Reply

    Greg
    Member

    The best way is to use an EAR project with one EJB module and one Web module. The EAR project model handles all of the dependencies for you on the deployment side. For the development side, you need to use the MyEclipse EAR project which automatically handles all of the web to EJB dependencies. For a very good introduction and tutorial for EAR projects in MyEclipse view the EAR Development quickstart.

    #219446 Reply

    LiLaLuna
    Member

    It is one way as the ear deployment is another way.
    Using your way:
    Make sure that you first deploy the EJB project and than the Web project.
    If you change anything in the EJB project you always have to redeploy the web project. if not you will get clasNotFound Exceptions.

    Sebastian
    http://www.laliluna.de
    EJB Tutorials
    Struts Tutorials
    and other

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Correct way to include an ejb into a new Project

You must be logged in to post in the forum log in