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 85339 - DB explorer doen't close connection to embedded database
Summary: DB explorer doen't close connection to embedded database
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 158587 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-20 13:42 UTC by Petr Blaha
Modified: 2009-07-27 12:49 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Blaha 2006-09-20 13:42:19 UTC
[NetBeans 5.5]
Originally reported by David Coldrick on mailing list. He used H2
(http://www.h2database.com/html/frame.html) embedded database and registered it
in DB Explorer. Then connect/disconnect and try to connect from other
application. However, the connection is still locked by IDE. It seems Disconnect
action doesn't really close the connection to DB.

Workaround: stop IDE 

Evidence of bug in IDE:
I have this sample:
Class.forName("org.h2.Driver");
        Connection conn =
DriverManager.getConnection("jdbc:h2:file:/home.local/blaha/ide/netbeans20060920/projects/dbdata/sample",
"sa", " ");
        PreparedStatement stmt = conn.prepareStatement("select * from PERSON");
        ResultSet rs = stmt.executeQuery();
        while(rs.next()) {
            System.out.println(rs.getInt(1) + ", " + rs.getString(2));
        }
        conn.close();
        while(true){
        }

Open/close connection but don't stop JVM. I was able to connect in the DB from IDE.
Comment 1 Andrei Badea 2007-02-14 11:54:17 UTC
Needs handling similar to embedded Derby.
Comment 2 Andrei Badea 2007-02-15 10:44:43 UTC
See also issue 85339.
Comment 3 Jiri Rechtacek 2009-02-10 15:38:18 UTC
Reassigned to new owner.
Comment 4 Jiri Rechtacek 2009-05-12 15:45:20 UTC
*** Issue 158587 has been marked as a duplicate of this issue. ***
Comment 5 Jiri Rechtacek 2009-07-01 07:44:06 UTC
NB6.7 was released already - http://www.netbeans.org/community/releases/67/
Postpone fixing this issue on the next release.
Comment 6 Jiri Rechtacek 2009-07-27 12:49:51 UTC
Hope it's http://hg.netbeans.org/main-golden/rev/33ab9ed49a09