I cannot be but sceptical about this code. Why do you want 10 connections? There is no guarantee that you will be taking only 10 connections or that when you close the connection, it would go back to the pool.
The question I have is whether you really require to open the connection in the called function. Open one connection for all your transactions and one you are done with it, close it. To effectively utilize the pooling of the App Server, you will be needed to code within its limits.
You can definitley increase the connections from 10 to how many you want. But that will not solve this problem.
No solution, but redesign!
Regards,<br />Joe<br /> <br />"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."<br />--Martin Golding
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad: