7 Replies Latest reply on Sep 26, 2009 5:27 AM by kapitanpetko

    communication between seamapps

    ajanz

      i got two seam applications which need to communicate via each other.  i got some application scoped beans for providing information and functions.


      will component.getinstance(...) work?


      or do i need to comunicate via ejb?

        • 1. Re: communication between seamapps
          cosmo

          I don't know if getting seam components from another application in the same container is possible, but I recomend you, unless you have a very good reason, not to tie the applications in that way, because if some day you realize security/allocation or any other pertinent requirements are not the same for both applications you will find yourself rethinking the logic, writing code and testing on a production system.


          My advise: invest a little today in WS or MDB and avoid headaches tomorrow.

          • 2. Re: communication between seamapps
            luke.poldo.mailinator.com

            Use RestEasy to build some restufull API and easily communicate between yours apps.


            For example look how ActiveResource in Rails works.

            • 3. Re: communication between seamapps
              phantasmo

              Is there anything equivalent to EJB's @Remote for Seam's JavaBean components? Meaning, is there a way to remotely and directly invoke a method on a non-EJB Seam component?
              I am aware of the implications of this approach but I'd still love to know... I am also quite sure that the OP was thinking along these lines as well...

              • 4. Re: communication between seamapps
                phantasmo

                Anyone?

                • 5. Re: communication between seamapps
                  kapitanpetko

                  You already got your answer: use JMS/RMI/JMS. Or you could start periodic jobs that check the database for some flag you set
                  and execute if set. Application context is per WAR, so you can't use it to share stuff (also breaks clustering, so generally a
                  bad idea).


                  • 6. Re: communication between seamapps
                    phantasmo

                    It seems to me you have confused me with the original poster :)
                    I was not talking about sharing application scoped components, I just wanted to know if JavaBean Seam components had an equivalent of EJB's @Remote interface.

                    • 7. Re: communication between seamapps
                      kapitanpetko

                      Bojan Tomic wrote on Sep 26, 2009 01:02:


                      It seems to me you have confused me with the original poster :)


                      Ah, sorry... You are the cat, I see now :)



                      I was not talking about sharing application scoped components, I just wanted to know if JavaBean Seam components had an equivalent of EJB's @Remote interface.


                      Not that i know of. You could of course implement Remote and make your bean available for remote calls, but you are not supposed to
                      do this in an application server.