-
1. Re: SE, Qualifiers and Event not working as expected
nickarls Feb 1, 2010 9:08 AM (in response to pieter.martin)As long as your qualifier annotations really are qualifiers, observeEventTest shouldn't fire. Could you check the JIRA if it's a known bug and file a new one if it's not?
-
2. Re: SE, Qualifiers and Event not working as expected
pieter.martin Feb 1, 2010 9:40 AM (in response to pieter.martin)Jira has WELD-384 which looks similar.
-
3. Re: SE, Qualifiers and Event not working as expected
pmuir Feb 1, 2010 1:17 PM (in response to pieter.martin)This is working in trunk, see http://fisheye.jboss.org/changelog/weld/?cs=5690 :-)
Double check you have trunk I think ;-)
-
4. Re: SE, Qualifiers and Event not working as expected
pieter.martin Feb 1, 2010 7:37 PM (in response to pieter.martin)Pulled the latest trunk and had a look at that code. It does not look to me that that test case is working even though it passes.
The method in Foo
public void start(@Observes ContainerInitialized event, ShutdownManager shutdownManager) { eventTest.fire(new Bar()); }
does not execute at all. Seeing as Foo.isObservedEventTest() is false to start with assert !Foo.isObservedEventTest(); passes in EventsTest.
It looks like
WeldContainer weld = new Weld().initialize();
does not start Weld up properly.
I have been using
org.jboss.weld.environment.se.StartMain.main(args)
to start up Weld and then the @Observes ContainerInitialized event fires.
Cheers
Pieter -
5. Re: SE, Qualifiers and Event not working as expected
pmuir Feb 1, 2010 9:31 PM (in response to pieter.martin)Good point! I manually fired the ContainerInitialized event, and also verified that the container initialized event is called. All looks good - not sure what is up with your code - distill it to a test case and we can look.
-
6. Re: SE, Qualifiers and Event not working as expected
pieter.martin Feb 2, 2010 10:08 AM (in response to pieter.martin)Ok thanks alls well, my qualifier annotation had @InterceptorBinding instead of @Qualifier which is kinda embarrassing.
Cheers
Pieter