OK, I solved :) Every event has @Any .


From: Gurkan Erdogdu <gurkanerdogdu@yahoo.com>
To: weld-dev@lists.jboss.org
Sent: Sun, January 17, 2010 12:05:06 AM
Subject: [weld-dev] Question Regarding to Event Qualifier @Any

Hi;

I want to ask about using @Any in event qualifiers. In TCK ObserverTest # testObserverNotifiedWhenEventTypeAndAllBindingsMatch;

Annotation roleBinding = new RoleBinding("Admin");

      // Fire an event that will be delivered to the two above observers
      AnEventType anEvent = new AnEventType();
      getCurrentManager().fireEvent(anEvent, roleBinding);

With observers;

1* public void observer(@Observes @Any AnEventType event)
2* public void observer(@Observes @Role("Admin") AnEventType event)

And TCK says that both of them are called by the container. I really confused the usage of @Any. AFAIK, @Any is any qualifier like others in Event context. Therefore 1* observer must not be called by the container because fired event does not contain @Any qualifier.

WDYT?

--Gurkan


Yahoo! Türkiye açıldı!
Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
www.yahoo.com.tr


Yahoo! Türkiye açıldı!
Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
www.yahoo.com.tr