EJB @Asynchronous does not work in one class

I have the following situation:

enter image description here

I want "methodB" to execute 10 times. But this only happens when "methodB" is called from another bean.

Why doesn't the @Asynchronous annotation work when a method is called from another method in the same class?

Thank.

+5
source share
1 answer

It only works for calling methods through a client proxy, such as @Localor @Remote. This is described in the EJB 3.1 specifications (section 4.5 - 4.5.1):

A bean session can expose methods with asynchronous client semantics

...

@Asynchronous annotation , - .

...

" ", " " " " .

+9

All Articles