You definitely want the runnables that do all the work to use a ConnectionPool. Just thinking out loud .. you could cause each Thread in the pool to have its own connection. Maybe a reason to extend Thread after all?
Just trying to figure out if I keep getting some kind of errors in the threads how to detect that in the main loop so can send some kind of notification to Admin rather than sending notifications in the threads.
I am curious if there will ever be a scenario where any thred never returns back and the program gets hangs. How can I make sure program does not hang or there is no deadlock issues. How to make sure all the threads does come back and never goes into a hang state.
How can I incorporate a common error handler in the above code.
Is there a way to get the datasource connection from connection pool even though it's a standalone program.
The xml size for the request and response is pretty big. When I get the response have to process the xml and safe it into mulitple tables.
Plus I am not on a multi CPU/core system.
I am bit concerned over if one thread gets hanged due to any reason then nothing proceeds until the thread dies or is done. Is there to set a time for each thread to return else forcefully stop that thread instance to continue so atleast the program continues and in the next run the record that hanged will be again picked-up.
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Appshttps://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous