I am calling a Oracle (10g) stored procedure from my java program and some time it gets hang.
Is there any way to define a time out so that it will pass the controll to the program. (Stored procedure is developed by 3rd party)
Printable View
I am calling a Oracle (10g) stored procedure from my java program and some time it gets hang.
Is there any way to define a time out so that it will pass the controll to the program. (Stored procedure is developed by 3rd party)
There is a setQueryTimeout on Statement.
I've not used it ,so can't say if it works or not, but you can test it out.
Failing that maybe fire this off in its own thread?
ETA: If you don't care about any return values then launching in its own thread might be the solution.