How to release a connection busy in backened procedure.
Hi all,
Could any one tell me how to release a connection that has been used by a backened procedure.
For instance, if i create a connection and use a callable statement to execute a routine at backened Then is there any way to release this connection from backened for other important purpose.
Thx. in advance
[336 byte] By [
Ahmad_22a] at [2007-11-27 9:07:28]

# 1
1. Shut down the DB (which will have adverse effects on the application).
2. Shutdown/kill the application (which still may not "free-up" the connection on the DB end).
3. Have a DB admin "cap" the connection, if possible in that DB (which will have adverse effects on the application).
4. If another thread has a reference to the Connection, simply close it from there (which will have an adverse reaction on the thread currently using the connection, but should clenaly close it).
5. If the DB is remote, pull the lan cable, or otherwise disable/interrupt the network connection (which will have adverse reactions on both the app and the DB).
If something like this absolutely has to be done, I would opt for number 4, because regardless of what you are doing, the connection will be "active" until the statement has finished, and even then you would have to actively close the connection or return it to the pool, if one of these two are needed. This does not, however, mean that the connection cannot be used for other purposes simultaneously. You can have multiple open statements on the same connection, you just can't have multiple open ResultSets on the same statement.