3 Replies Latest reply on Apr 13, 2009 10:38 PM by gonorrhea

    Observing many event 'types'

      Seam Events aren't types:

      @RaiseEvent('com.rjp.myEvent')

      I'm looking for a way to @Observe events whose name match a pattern (like com.rjp.*).

      I've dug in and haven't yet found a strategy for getting this behavior (short of an organ transplant :-) )

      I'm still pretty new to Seam and I'm hoping the more experienced Seamsters (or Seamstress') might have a better perspective on this. 

      I've considered subclassing the Events and installing my own overriding raiseEvent(...) but some of the dispatch machinery is spread into the Init class and how it registers Observers.  Replacing Events and Init feels like pretty radical surgery. 

      Any help is appreciated.
        • 1. Re: Observing many event 'types'
          norman

          I don't believe we support this.

          • 2. Re: Observing many event 'types'

            Norman Richards wrote on Apr 12, 2009 02:34:


            I don't believe we support this.


            Thanks.  It's clear it's not supported out of the box.  I'm looking to leverage the flexibility inherent in the framework to get the behavior I'm looking for. I was hoping the more adventurous  types in this community might have a more elegant approach to bending this particular bit of framework behavior to my will :-)


            I'll keep studying the code to find an angle.


            Thanks,


            Ron

            • 3. Re: Observing many event 'types'
              gonorrhea

              sounds like some refactoring like adding regex functionality to the String (or package but it's basically a String) that the @Observe observes.