August 2018
Intermediate to advanced
314 pages
8h 9m
English
The EJB 3.1 specification incorporated asynchronous methods to session beans with the use of an @javax.ejb.Asynchronous annotation. Consequently, we can have asynchronous processing from a simple call to an EJB method.
The @javax.ejb.Asynchronous annotation can be applied to a class of a session bean or applied to individual methods of this class. If applied to the entire class, all business methods of this bean are called asynchronously. Otherwise, only the methods with the annotation will be called asynchronously:
@Stateless public class MyBean @Asynchronous public void veryTimeConsumingProcess1 (SomeFilterBean filter) { //código para cadastrar um pedido } @Asynchronous public Future veryTimeConsumingProcess2 (SomeFilterBean ...Read now
Unlock full access