6 Replies Latest reply on Jun 17, 2010 4:20 AM by Thomas Jonsson

    Multiple war's in ear working?

    Daniel Wachter Newbie

      Like announced in http://in.relation.to/Bloggers/Seam220GAIsOut
      Seam 2.2 has now (finally) support for deploy multiple war files.


      Right now I'm on the decision point to go with multiple war's in our seam project or leave it as single...
      My questions to the community:




      1. Did any one have some experience with seam 2.2 and multiple war's, does it really work?

      2. Are there any examples to make some research?

      3. What are the possibilities for SSO?



      Thanks for any informations...

      Greetings Daniel


        • 1. Re: Multiple war's in ear working?
          Stuart Douglas Master

          Yes it does. I did the work for this, and as far as I know all the JIRA issues have been resolved.


          My original post about the problems can be found here.


          Out of the problems mentioned everything except async methods, jbpm and spring integration have been fixed. This does not mean that they will not work, it just means that they will only run in one of the available application contexts. For most applications this should not cause problems.


          Also hot deployment of .page.xml files does not work, there is a patch for this in JIRA but I did not get it done in time for 2.2.



          Stuart




          • 2. Re: Multiple war's in ear working?
            Andre Fernando Salvati Novice

            Stuart Douglas wrote on Aug 26, 2009 13:46:


            Yes it does.



            Hi Stuart,


            thanks for your tips on this subject.


            I still have some questions:


            - It seems your changes in dvdstore example aren't in trunk. Is it supposed to be there?


            - I would like to split my application in functional modules (accounting, sales - see bellow). Is it possible to redirect navigation flow from War1 to War2 without login? I also would like to split my POJOS on the same way, is it possible? Would it be better if I wait for OSGI deployers on JBoss 5?


            erp.ear
              ---- accounting.war
              ---- accounting.jar
              ---- sales.war
              ---- sales.jar


            - If it is possible, where can I find a sample application with this structure?


            • 3. Re: Multiple war's in ear working?
              Andre Fernando Salvati Novice

              Andre Salvati wrote on Sep 19, 2009 23:24:



              Stuart Douglas wrote on Aug 26, 2009 13:46:


              Yes it does.



              Hi Stuart,

              thanks for your tips on this subject.

              I still have some questions:

              - It seems your changes in dvdstore example aren't in trunk. Is it supposed to be there?

              - I would like to split my application in functional modules (accounting, sales - see bellow). Is it possible to redirect navigation flow from War1 to War2 without login? I also would like to split my POJOS on the same way, is it possible? Would it be better if I wait for OSGI deployers on JBoss 5?

              erp.ear
                ---- accounting.war
                ---- accounting.jar
                ---- sales.war
                ---- sales.jar

              - If it is possible, where can I find a sample application with this structure?




              Now, with indentation...



              erp.ear


                ---- accounting.war


                ---- accounting.jar


                ---- sales.war


                ---- sales.jar



              Click HELP for text formatting instructions. Then edit this text and check the preview.

              • 4. Re: Multiple war's in ear working?
                eric jung Newbie

                Hi,


                Can conversation-scoped Seam components be shared across WARs that live within the same EAR? The servlet specification says:



                SRV.7.3 Session Scope

                HttpSession objects must be scoped at the application (or servlet context) level.
                The underlying mechanism, such as the cookie used to establish the session, can be
                the same for different contexts, but the object referenced, including the attributes in
                that object, must never be shared between contexts by the container.
                To illustrate this requirement with an example: if a servlet uses the
                RequestDispatcher to call a servlet in another Web application, any sessions
                created for and visible to the servlet being called must be different from those
                visible to the calling servlet.


                So is Seam conversation scope restricted in the same way? Can it be shared across Seam components in different WARs?


                Thanks, eric

                • 5. Re: Multiple war's in ear working?
                  Arbi Sookazian Master

                  Eric Jung wrote on Sep 25, 2009 19:32:


                  Hi,

                  Can conversation-scoped Seam components be shared across WARs that live within the same EAR? The servlet specification says:

                  SRV.7.3 Session Scope

                  HttpSession objects must be scoped at the application (or servlet context) level.
                  The underlying mechanism, such as the cookie used to establish the session, can be
                  the same for different contexts, but the object referenced, including the attributes in
                  that object, must never be shared between contexts by the container.
                  To illustrate this requirement with an example: if a servlet uses the
                  RequestDispatcher to call a servlet in another Web application, any sessions
                  created for and visible to the servlet being called must be different from those
                  visible to the calling servlet.


                  So is Seam conversation scope restricted in the same way? Can it be shared across Seam components in different WARs?

                  Thanks, eric


                  Good question.  Anybody know the answer?  I am guessing no (i.e. you can't join a LRC from one Seam component in WAR foo with another Seam component in WAR bar).

                  • 6. Re: Multiple war's in ear working?
                    Thomas Jonsson Newbie

                    Personally I think it can get a mess if you start sharing context variables between webapps. Then you might also have to have a compilation dependency between your webapps. I should have made a ejb with components that both webapps can share.