multi-threaded invoke


I’m looking for some advice on how to implement a multi-threaded document handler in IS. We have an application that receives purchase order documents over the web. Often the PO documents only contain one order but sometimes we receive documents that contain 300 or 400 individual orders. Since they come in one document they are process sequentially in a single thread.

We have a service that splits each order out and then processes them one at a time. I would like to change this to have the server process chunks of the orders concurrently in say batches of 15 or 20.

Has anyone ever had this problem before? How did you handle firing of 20 threaded invokes and then waiting for all of them to finish before starting the next batch?

Any assistance would be appreciated.


If you’re using TN: one approach would be to split the doc and submit each PO to TN. The rule that processes each PO could be configured to run asynch.

If you’re not using TN, I assume you’re familiar with and using Service.doThreadInvoke. The returned object for those methods is a ServiceThread. You can call ServiceThread.getData() for each thread to force a join. It will be interesting to see if that actually improves throughput.