Java Service along with Threads


I need to write a Java service, that involves threads.

I need to invoke 2 flow service using a single thread.

Its a urgent.

Thank u

Please refer the webMethods JavaAPI in the Developer tool/Help section.You could use any of doInvoke or Threaded invoke API services that you are looking for.Also search this forum on the java thread services you should see some threads that are helpful.


Can you give more information on what you are trying to accomplish


Use the wMUsers search function to search for posts containing “doThreadedInvoke”.


A couple quick questions for you:

  • What leads you to “need to write a Java service?”

  • You mention that the service will “involve threads” but then follow up with “invoke 2 flow service using a single thread” which seems to be contradicatory. Do you mean, from one thread, start 2 new threads to run the services?

  • Are you attempting to address a performance issue?


Ur right… its regarding performance issue… I want two services running parallelly…

Can i achieve this by using two ‘doThreadInvoke’ , callin to different service???

Thanks in advance

Yes, calling doThreadInvoke twice will create two threads to run the services you specify. Refer to the IS Java API for details.

I would advise to be cautious about assuming a performance gain when calling services in a threaded manner. Depending upon what the services do and how they are structured, it may or may not be faster.

Thank u… I’ll check that out…