Calling any java method as thread
Posted on 2008-06-16
I have an existing webservices project, with 100+ class files, each one basically runs a query, and return results.
I need to build some new hits that do several various hits asynchronously. Then return data. How can I do this without making a bunch of modifications(or as little as possible) to the various class files. It needs to be done at this webservice level, I can't have the calling applications do the hits asynchronously.
So my visualized solution is something like:
String a =CallAsThread(ClassLoader.SomeClass.getTheseDBConfigs(),ClassLoader.SomeClass2.getTheseDBConfigs2()));
Where CallAsThread calls the 2 different classes as threads, joins them, gets and returns there results or however this can be accomplished.