[weld-dev] Question Regarding to Event Qualifier @Any

Gurkan Erdogdu gurkanerdogdu at yahoo.com
Sat Jan 16 17:05:06 EST 2010


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ı!  http://yahoo.com.tr
İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20100116/a4c916f9/attachment.html 


More information about the weld-dev mailing list