[weld-dev] Question Regarding to Event Qualifier @Any
Gurkan Erdogdu
gurkanerdogdu at yahoo.com
Sat Jan 16 17:11:42 EST 2010
OK, I solved :) Every event has @Any .
________________________________
From: Gurkan Erdogdu <gurkanerdogdu at yahoo.com>
To: weld-dev at 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ı! 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/faf64a2d/attachment.html
More information about the weld-dev
mailing list