openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars-Fredrik Smedberg <>
Subject WAS and Application Context during @Asynchronous EJB method calls
Date Wed, 07 May 2014 08:42:47 GMT

We are using Websphere (right now Liberty Profile April Beta since we use
Liberty Profile in development and need the async EJB functionality) to
test CDI, EJB and @Asynchronous method calls.

The scenario is the folowing:

1. An @ApplicationScoped bean is configured by an Event fired by
RequestContextListener (we could not fire the event from a
ServletContextListener, more on that in another post).
2. I have debugged and can see that the event reaches the
@ApplicationScoped bean and it gets initialized.
3. The @Asynchronous method on the EJB injects and uses the
@ApplicationScoped bean BUT the contextual instance is NOT the same as the
one in 2 above (and its therefore not initialized properly).

If I remove the @Asynchronous annotation from the EJB method and re-run the
scenario above everything works fine (the contextual instance of the
@ApplicationScoped bean is the same).

I see in 6.7.3 of the CDI 1.0 specification (1.0 since we use WAS) that the
Application context should be shared and the @Asynchronous scenario above
should work.

Did I misunderstand something or is this a bug that we should report to IBM?


Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at, and destroy all copies of this
message and any attachments.

View raw message