CDI Observer Annotated with @Stateless Receives two Events
(Doc ID 1545987.1)
Last updated on FEBRUARY 05, 2019
Applies to:Oracle WebLogic Server - Version 18.104.22.168 and later
Information in this document applies to any platform.
Using 12.1.1 WLS server, the issue is that an observer bean 's method is invoked twice when firing an event.
1) An EJB method ( fireCDIEvent) is invoked :
The problem is that when calling testHandler.fire for one event,
the EJB observer bean method (testObserver method) is called two times .
In our example above, when fireCDIEvent () method is invoked, testObserver () method is called twice so the following output is displayed :
The expected behavior is that testObserver method is invoked only one time when an event is fired.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document