10 Replies Latest reply on Nov 12, 2007 9:18 AM by claprun

    IPC betweens Portlets in two war Files

    ratz

      It is possible with the JBoss IPC-API to communicate with a Portlet in another application?

        • 1. Re: IPC betweens Portlets in two war Files
          claprun

          Yes. What do you have in mind? IPC works by listening to events that are bound to portal objects (pages, windows, etc.) so they are not bound not portlets.

          • 2. Re: IPC betweens Portlets in two war Files
            ratz

            Hi Chris,

            thans for your answer.

            I am write a Thesis about IPC at my university. So i only wanted to know it.

            Best regards
            Patrick

            • 3. Re: IPC betweens Portlets in two war Files

              Just a question though.

              How in a deployment package (war file) can you refer to an object or instance defined in another package ?

              • 4. Re: IPC betweens Portlets in two war Files
                claprun

                I suggest that you take a look at the IPC example in Portal's documentation:
                http://docs.jboss.com/jbportal/v2.6.2/referenceGuide/html/portalapi.html#d0e4751

                • 5. Re: IPC betweens Portlets in two war Files

                  The original question was about IPC between portlets in different applications. You have answered YES and I don't see how two portlets in different virtual portal can exchange events by the exposed mechanism which by the way I am using in my own application without problems. Reading your words makes me feeling I am an idiot, I was just curious.

                  • 6. Re: IPC betweens Portlets in two war Files
                    claprun

                    Sorry, didn't intend to belittle you... :(

                    I have use the IPC mechanism to trigger an action on a remote portlet via WSRP based on the result of an action on a local portlet. As you can see in the documentation, nowhere is it required that the portlets be in the same web application since objects are referred to by their portal names (window name, page name, etc). Maybe you are referring to sharing data via the PortletSession application scope, in which case, you do indeed need to have all the portlets involved in the same web application?

                    • 7. Re: IPC betweens Portlets in two war Files

                      Thanks for the response. For some reason I had in mind the context of one page and I did not see how to have two windows from different packages on the same page (perhaps you have an answer for that too).

                      • 8. Re: IPC betweens Portlets in two war Files
                        claprun

                        I'm afraid I don't understand what you mean. Once portlets are deployed, it doesn't matter, at least from the Portal perspective, which package they come from. You create instances which are then assigned to windows, regardless of the underlying web applications. So I am not quite sure what you mean by:

                        how to have two windows from different packages on the same page


                        • 9. Re: IPC betweens Portlets in two war Files

                          I have 3000 and more portlet instances, it takes 45 mn to start the server in one war file, so I split it up artificially. In a war file I cannot declare a portlet instance that refers to (<portlet-ref>) a portlet in another war file. I believe I could do that programmatically but not with deployment package.

                          • 10. Re: IPC betweens Portlets in two war Files
                            claprun

                            I see. This is not what we would call IPC though. It is not, indeed, currently possible to refer to portlets outside of the current web application in your deployment descriptors.