I have a web service that accepts and queues commands for a legacy application. The legacy application can take several minutes to complete. Is there a best practice for the threading model of my go-between service?
The easiest implementation invokes the legacy application synchronously, hanging my service thread until the legacy app completes. That doesn't seem efficient, but with my JAX-WS-based service interfaces for two-way requests, it looks like my hands are tied: I can't leave the implementing function (to free the thread for more useful things) until I have my client's response. Am I missing something? Is there no graceful way to defer the response? I looked at InterceptorChain.pause() and InterceptorChain.resume() which come close to what I need, if I understand them correctly. But the point I want to pause is in the middle of my business logic, not an interceptor chain. Dan
