I have multiple stored procedures which are on my DB example: proc1, proc2, ...proc10.
I want to call them in a loop from java. What is the best way to do this to avoid multiple network trips, repeated compiling, performance ?
This is what I have now:
for (int i = 1; i <= 10; i++)
{
CallableStatement stmt = conn.prepareCall("call proc"+i);
stmt.execute()
}
I don't want to execute a single top level procedure calling these 10 procedures as I want more control of these executions from my code. For example, I might get an interrupt after I execute 5 procedures and may have to context switch. I can't do this when I execute a top level procedure on the server side