openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: Injecting beans in listeners
Date Fri, 16 May 2014 23:31:27 GMT
On Thu, May 15, 2014 at 2:24 PM, Lars-Fredrik Smedberg
<itsmeden@gmail.com> wrote:
> Hi Eric
>
> I tried to call the business method on the injected application scoped bean
> from the contextInitialized method in the ServletContextListener, thats when
> I get the ContextNotActiveException.
>
> I also tried to fire an event in the contextInitialized method and have the
> application scoped bean observe the same event. This causes a printout on
> the console saying that it cannot send the event to the bean (I do not
> remember the exact message on the console).
>
> I tried the same code in TomEE and it works and if I understand the CDI 1.0
> spec correctly there should be an active application context in the
> contextInitialized method of the ServletContextListener.
>

You'll probably need a ticket with IBM to figure out why the context
is not active _on that thread_. I did not see any matches in the
8.5.5.2 fix list.

Mime
View raw message