Skip to main content



      Home
Home » Eclipse Projects » GlassFish » CDI issue (The Glassfish container is not invoking the event listener method injected in Singleton)
CDI issue [message #1837268] Tue, 26 January 2021 09:17
Eclipse UserFriend
Hi, I am new to the Eclipse Community forums, and I hope I have selected the right forum for my post.
I have a Singleton class that has a CDI for an event listener object. The dependency is being created at the injection point, however, when the event is fired by the singleton class, the container is not invoking the event listener. Similarly, if I inject an interceptor at the class level on the Singleton, it never gets invoked. Surprisingly, If I change the annotation on the class from @Singleton @Stateless or @Stateful session bean then everything works fine. Any idea why the container behaves so differently with the session bean .vs. Singleton when it comes to CDI?

Thanks in advance.
Previous Topic:[Java15] maven-embedded-glassfish-plugin with latest glassfish
Next Topic:out of box REST archetype gives 404 error
Goto Forum:
  


Current Time: Wed Apr 30 20:47:52 EDT 2025

Powered by FUDForum. Page generated in 0.03148 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top