2 Replies Latest reply on Nov 4, 2005 11:57 PM by patrick_ibg

    new to EJBs: best way to package ear/par/ejb3/war

    patrick_ibg

      Hi all,

      I have a codebase with the following components:

      - Annotated Entity Beans that are seam components
      - SLSB DAOs that are also seam components
      - SLSB and SFSB seam components for handling JSF actions.
      - 1 or more war files containing JSF views (.xhtml) and view configs. Multiple war files would use the same EJBs.
      - Separate hbm.xml and cfg.xml to map my Entity Beans and import from a legacy database. (This runs outside of a container...)

      My current idea is to:
      - package Entity Beans and DAOs in a par file
      - package JSF handler beans in an ejb3 file.
      - keep the war file as is...
      - put all of the above in an ear file.
      - The legacy stuff goes in a jar file that does not get deployed.

      I have everything packaged in an ear. However, the handler beans do not see the par entities.

      There's probably a basic concept that I'm not understanding here... I would really appreciate the help...


        • 1. Re: new to EJBs: best way to package ear/par/ejb3/war
          gavin.king

          >> - package Entity Beans and DAOs in a par file

          I don't *think* you are allowed to put session beans in a par.

          P.S.

          By the way, the J2EE group overruled the EJB3 group (grr) and stomped on par archives. So the next (proposed final) draft of the EJB3 spec will have a rearchitected packaging.

          Also, I'm not sure if you realize, but the .ejb3 extension is actually non-spec-compliant and won't run outside of JBoss EJB3. We need to fix the Seam examples to follow the spec on this (I think I just need to change the extension). I forgot to fix this before releasing.

          I hate packaging ;-)

          • 2. Re: new to EJBs: best way to package ear/par/ejb3/war
            patrick_ibg

            Funny that, prior to posting this topic, I googled for "par" and found quite a few references to "portal archive resource" pertaining to a JSR on portlets and quietly wondered how the standards folks would deal with the extension naming collision.

            Was that the reason for the J2EE group's opposition, or were they against the idea of a persistence archive in general?