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.

Bug 74185 - No way to disconnect to DB if Executing SQL Statements
Summary: No way to disconnect to DB if Executing SQL Statements
Status: CLOSED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-30 09:05 UTC by Marian Mirilovic
Modified: 2007-05-04 08:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (2.85 KB, text/plain)
2006-06-02 13:37 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2006-03-30 09:05:47 UTC
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
Comment 1 Andrei Badea 2006-03-30 12:27:09 UTC
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).
Comment 2 Marian Mirilovic 2006-04-06 09:59:09 UTC
> 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.
Comment 3 Andrei Badea 2006-06-02 13:37:04 UTC
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.
Comment 4 Andrei Badea 2006-06-02 13:37:35 UTC
Created attachment 30747 [details]
Thread dump
Comment 5 Marian Mirilovic 2007-05-04 08:20:06 UTC
v/c