facebook

Multiple EJBs

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #213445 Reply

    Horacio
    Member

    Hi.
    I’m having trouble understanding the EAR Project model.
    My project will have multiple EJBs, between session and entity beans. Can I put all of them inside a single EJB Project, or do I need to create a new project for each EJB?
    Also, if I have utility/helper/misc classes, can I put them under the EAR project? If not, where do they go? (for example, value objects or data access objects used in multiple EJBs)
    Also, where should Struts actions go? Where in the We Project?
    I’m asking because I haven’t found any docs on that matter (any link is appreciated).
    Thanks.

    #213452 Reply

    Riyad Kalla
    Member

    Can I put all of them inside a single EJB Project, or do I need to create a new project for each EJB?

    They can all go in 1 project

    Also, if I have utility/helper/misc classes, can I put them under the EAR project?

    You might want to consider placing them in a Java Project that you can mark as a dependency of the EJB project.

    Also, where should Struts actions go? Where in the We Project?

    Yep, Struts stuff would go into a new Web Module Project.

    Let me give you the 10k foot view of the situation:
    Web Module Projects are basically “Web Projects”, things like JSP/Servlet, Struts, WebWork2, etc. These are your “web applications”.

    EJB Module Projects are your EJBs… that’s a gimme 😉

    Java Projects can be for utility libraries or classes that these projects may use (assuming its not already packaged in a JAR like Struts that you just drop in).

    Then on the top of it all you have the EAP Project, which can assign EJB projects and Web projects to which is kind of a “wrapper” project for deployment. It knows how to bundle everything together and deploy it.

    But, you can also deploy Web Module projects if you are, for example, just working on a Struts app with no EJBs. You can also setup Java projects as dependencies to the Web module project, such that those Java projects are packaged up and deployed with the Web module project when you deploy it… its more or less a convenience thing. These deployment controls are available under Project Properties > MyEclipse-Web.

    Did this help give you more of an idea?

    #213477 Reply

    Horacio
    Member

    Yes, it did, but I still have some questions:
    Is there any example/tutorial on working with more than one EJB in an EJB Project? I mean, how should I layout the directory structure inside the project so that it works?
    Also, I mark a project as a dependency project, but then how do I use it? (I tried doing that with some other project here and couldn’t access its classes; I just maked that project A depends on B (in A’s properties) and tried to use B’s classes’ in A…may be I missed something?)
    Thanks again.

    #213483 Reply

    Riyad Kalla
    Member

    Is there any example/tutorial on working with more than one EJB in an EJB Project?

    Not currently, but documentation is a very high priority item right now.

    Also, I mark a project as a dependency project, but then how do I use it?

    Be sure to add it under the Java Build Path > Projects tab as well, then you shouldn’t have any problems.

    Please note that there were a few bugs due to inter-project class resolution that were fixed in the 3.8.1 and quickfix releases. You can get 3.8.1 from the site download section and the quickfix is here: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-3513.html

    #214472 Reply

    Horacio
    Member

    Hi.
    Any idea on when the documentation for working with multiple EJBs in one project will be available?
    I need to know how to layout the pakages and how to handle multiple descriptors (ie: where to put them, since the project has only one).
    Any help is welcome.

    #214488 Reply

    Riyad Kalla
    Member

    I’ve asked one of the devs to hop in and provide some help as documentation is still in transit.

    #228117 Reply

    dbblanton
    Member

    I would be interested in the documentation describing multiple EJB development.

    Specifically I would be interested in knowing about the following scenario. I created a Message Driven Bean within an existing EJB project, then decided to create a new EJB project within which I created another MDB (by itself within that project). I noticed that in the new project a “*Util.java” file was created for this second MDB when I ran XDoclet. In the other EJB Project (the one that existed and already had an EJB) no such “*Util.java” file was created? Is there a reason for this or did I perform something incorrectly along the way?

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Multiple EJBs

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