1 Reply Latest reply on Aug 17, 2009 11:30 AM by Leo van den berg

    application wide events

    Benito Juarez Newbie


      some strange problem: I'd like to raise an event from an session scoped bean. This event shall be observed by another session scoped bean in all opened sessions. How can i do this? The event context seems to be encapsulated within session context, so there is no communication between session.


        • 1. Re: application wide events
          Leo van den berg Master


          As far as I've tried out, there is no possiblity to broadcast events from one session to another one. The first thing you can do is to use an application scoped bean which processes events and re-sends them to other session. I've done this in combination with ajax-poll, whic triggers a rerender after receiving an event (you need an eventListener, which is the application scoped bean, which listens to events).

          Another approch I used is using JMS for relaying session-scoped events to the application. It's a bit more alaborate, but the big advantage is that you can filter message-reception, and you can also heve MDB's listen to events and (in my case a requirement) also remote java-clients listening to a Topic.