A Java service and the doThreadInvoke method is indeed one way to accomplish parallel processing, but it won’t get you out to the LB switch. There are a few ways.
You touched on probably one of the easier techniques, depending upon if you need the results of all the bicycle assemblies to come back together or not.
If each bike can be kicked off independently, not needing to join the batch at the end, the easiest way is to do an HTTP get/post to the virtual host/IP of your load-balanced IS instances. The key is to not have the invoked service do all the work before returning a success response–it must receive the document then kick off async processing of the doc (using doThreadInvoke) and return ok right away.
One variation on this is with Trading Networks. Each bike is posted to the virtual host/IP (via the load balancer) to a service that submits the doc to TN. Configure the rule to by async and TN will return control to the service after the doc is successfully saved (and recognized) so that ok can be returned before document processing really starts. This achieves the async without needing to use doThreadInvoke as TN does the async work for you (and tracks it).
Another approach can use the Broker, if you already use it in your environment (I wouldn’t introduce it for only this purpose). For each bike, publish a doc. Configure each IS to connect to the same Broker with the same prefix and have the same triggers and trigger service. Set the configuration of the trigger to concurrent, with max threads and such. Each IS instance will process bikes off the single queue, giving you controlled parallel processing.
Another approach might be via Designer and the process engine (PE). A model can be configure to run things in parallel. It can also be configured to have steps execute on different logical servers (which can be mapped to different physical servers). This would be a different way to use Broker (the PE would publish step transitions).
Hope one of these approaches will work for you or trigger some ideas.
#webMethods#webMethods-Archive#If-it-doesn-t-fit-anywhere-else