3 Replies Latest reply on Feb 8, 2007 7:26 AM by Peter Goetz

    Sharing libs

    Robert Lamie Newbie

      Hi all,
      Sorry for this newbie question, but I'd like to share an helper archive (.jar) and some classes between the web (.war) and the ejb (.jar) archives inside an ear file.
      What is the best practice?
      F

        • 1. Re: Sharing libs
          Peter Goetz Newbie

          Hi,

          put the helper-jar in the ear and fill the Classpath-element in META-INF of the war and ejb-jar with this entry.

          Peter

          • 2. Re: Sharing libs
            Robert Lamie Newbie

            Thank you.
            Another pretty basic question, but my servlets lookup ejbs through jndi, so I need interfaces of my ejbs to be known at the web container level. Is it automatic ? Or i need to package interfaces in a jar and put it in the WEB-INF/lib of my .war ?

            • 3. Re: Sharing libs
              Peter Goetz Newbie

              Hi,

              you could use the following packaging:
              - bean classes and bean resources in YOUR_EJB.jar
              - home and component interfaces in YOUR_EJB_client.jar
              Then you can put the client.jar into your ear, add the reference to the manifest.mf of your web-application (or give it to any other client you wish) and you can be sure, that anyone using your ejb does only need to know the client interfaces.

              Peter