a beginner .. need small clarification


EJB programming & troubleshooting: a beginner .. need small clarification

  1. a beginner .. need small clarification (1 messages)


    I have read all basics in EJB and i have understood how Entity(E) and Session(S) beans are written.

    I understand that each bean (E or S) needs to have a deployment descriptor (an xml) along with its interfaces, helper classes. All this stuff is packaged as jar file.

    Now when we come to an application level, we need an EAR file, which contains the jar's, war's and a deployment descriptor ... for the whole application.

    My questions are

    1. Assume we had some 50 beans in the application (E+S) .. then while creating EAR .. do we need to add all 50 jar's or do we just add the main class of the main bean that deals with all the beans ?

    2. I am confused if we need to have deployment descriptor for each and every bean .. or we just package the whole beans part of the application into a single jar file ... and then add this jar file into the EAR along with the war's and the deployment descriptor ?

    Plz do ask me if my question isnt clear ... this will help me alot.

    Thanks in advance

  2. a beginner .. need small clarification[ Go to top ]

    You can have a single jar file containing all 50 EJBs and a single deployment descriptor with 50 entries (one for each EJB in the jar file).

    You can have 50 jar files, each containing an EJB and a deployment descriptor with a single entry (for the EJB in that particular jar file).

    You can have 2 jar files, one with 20 EJBs and the other with 30. Jar file 1 has a deployment descriptor with 20 entries, jar file 2 has a deployment descriptor with 30 entries.

    Get the idea?