We have a requirement where we have to make four web service calls from our EJB. All these calls are independent of each other and should be made simultaneously.
Today we are using ExecutorService
to make these calls. There is a timeout after which we shutdown the ExecutorService
and check the responses.
I want to know if there is a better way to do the same?
P.S. We use websphere 8.5.0 which is a Java EE 6 server. I found there is ManagedExecutorService in Java EE 7. Is there anything in Java EE 6?