This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NB Dev (200603291800), JDK 1.5.0_06 & JDK 6.0 Steps to reproduce: - add DB driver - make connection to DB - push Execute Command menu item - write selection - push Run SQL button from toolbar - Executing SQL Statements process is opened and shown in the status bar - invoke Disconnect on the DB node -> nothing happend, DB is still connected
First of all, I don't consider this a P2. Second, I would suggest to test the SQL editor in the release55 branch, as some enhancements have been implemented in this branch. But it's true that it isn't possible do disconnect the connection in 5.5 either. What would you expect the outcome of this operation to be? Note that calling close() on the connection is not likely to succeeed because of the locking used by some drivers (the connection is locked by the thread executing statements).
> First of all, I don't consider this a P2. From my point of view, if you don't have control you can't use it ;( That's the reason for P2, but never mind if you fix it ASAP. If the execution of statement takes ages and you consider don't wait for the result after few minutes, you have to restart IDE just to be able run another one, that's pretty uncomfortable workarround. > Second, I would suggest to test the SQL editor in the release55 branch, as > some enhancements have been implemented in this branch. I am not a tester of db, so I am not testing it - I am trying to use it, like anybody else from the community. > What would you expect the outcome of this operation to be? Note that calling I would expect anything that will "close/kill" the connection and allows me to run new one.
The DB Explorer already does the best it can to close the connection, that is, it calls java.sql.Connection.close(). This call can block, and it does if the driver is busy doing somethin else (e.g. waiting from data in another thread). Look at the attached thread dump for an example. In the SQLExecution thread the SQL editor is executing a statement. Note this thread holds the Statement object's lock. In the RequestProcessor thread the DBExplorer has called Connection.close() and, as you can see, this method is waiting to lock the Statement object. I don't think it is possible to do more, so closing as WONTFIX. Sorry.
Created attachment 30747 [details] Thread dump
v/c