Personally I'd have the response say nothing more than a request was successfully received. If you don't want the client to wait for the whole operation to complete than there's no way you can tell them anything more than that in one operation.
Use something standard and well known like JMS to hand off to the legacy service so your request can complete after initial processing (e.g. validation and sending via JMS). Brad. On Mon, Jul 14, 2008 at 5:47 AM, Dan Retzlaff <[EMAIL PROTECTED]> wrote: > 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 >
