I've requirement to start some processing after receiving a request and validating the same. The return of the web service response needs to be sent immediately after kicking off the process and shouldn't wait for it to be finished.
One possible way to do this was using different threads. But, my application is deployed on weblogic and for web service, it's using axis 1.4 (old application). I've read that it's not a good idea to create our own threads when weblogic is managing the same.
I am sure that this is very regular scenario so can any one guide me about what should be the correct approach?
Since you are using an application server, have you considered sending asynchronous messages to a message driven bean?
This way, the web service is free to return immediately and there can be multiple instances of the MDB processing requests in parallel.
If you are able to use EJB 3.1, you do not need to use an MDB, since regular session beans can also be invoked asynchronously.
And yes, only asynchronous operation will do the trick for me. What I want is to trigger some processes and without waiting for them to complete, return the web service response to client.
I don't want to go for asynchronous web service as I want to avoid the serialization overhead. But, I wonder if we have any way of calling these web services locally. Also, Axis 1.4 - not sure if it supports asynchronous web service.