1 Reply Latest reply on Mar 3, 2010 2:53 PM by wangliyu

    JCDI Event observer without parameter?

    wangliyu

      Seam2 support observe event without passing any parameters (when all the parameters are in the scoped context, there is no need for passing them again).
      JCDI require one and only one @Observer parameter for event observing. Does anybody know how to not passing any parameter and observe event in the JCDI? I'm wondering how to merge the seam2 event observer components into JCDI.


      Thanks,

        • 1. Re: JCDI Event observer without parameter?
          wangliyu
          Check the API doc. it said:
          @Target(value=PARAMETER)
          @Retention(value=RUNTIME)
          @Documented
          public @interface Observes

          why can't say @Target({PARAMETER, METHOD}), so that I can use like this:
          @Observe
          @SomeQualifier
          public void someMethod() {
          }