August 2018
Intermediate to advanced
314 pages
8h 9m
English
The following code shows an example of a stateless EJB asynchronous method. Suppose there is a method responsible for approving and scheduling student test reviews and we want to call this method in an asynchronous way:
@javax.ejb.Statelesspublic AcademicServiceBean { @javax.ejb.Asynchronous public Future requestTestReview( Test test) { // ... } }
We will look at a bean client that requests a test review service, as follows:
@Named @SessionScopepublic TestController { @Inject private AcademicServiceBean academicBean; private Future statusTestReview; public void requestTestReview(){ /* get Test object which has the test data, like: test date; student who made the test; discipline, etc.*/ ...Read now
Unlock full access