This content has been marked as final.
Show 1 reply
-
1. Re: Can you get the active Statement object from a Connectio
alchemista Sep 19, 2007 11:13 AM (in response to alchemista)As a follow-up for future searchers:
We had to customize our own code to store a reference to the Statement and then try to cancel() it from the separate thread.
That worked but then the original Statement hung on the close() method.
What we had to do, using Oracle, was to store the Oracle session ID of the executing thread, then issue a separate call to the DB to kill that session.
It's a shame that didn't work in JDBC, as that appears to be the point of Statement.cancel(). Maybe it's Oracle-only JDBC implementation, but I could not find much general info on the web.