Hi,
I have a JAX-WS webservice that has to start a long process that is not required for the webservice response.
I tried to create a new Runnable
thread and start it from the webservice method, but it waits for the runnable thread to finish before send the response.
This is an example, where Hilo is a Runnable class
@WebService
public class Calculator implements CalculatorWs {
public int sum(int add1, int add2) {
Hilo h = new Hilo();
h.run();
return add1 + add2;
}
public int multiply(int mul1, int mul2) {
return mul1 * mul2;
}
}
I need to send the response before Hilo finishes. What am I missing?
Thanks.