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 250442 - Database connection icon does not change to disconnected
Summary: Database connection icon does not change to disconnected
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-16 11:06 UTC by MackSix
Modified: 2015-02-24 09:59 UTC (History)
5 users (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 MackSix 2015-02-16 11:06:35 UTC
1. In the services window, start Derby (Java DB) and make a connection.
2. The database connection node icon changes to a solid square indicating a connection.
3. Disconnect node from Derby.

Result: Connection icon stays solid.

Expected: Connection node icon changes back to split, indicating no connection.

This only happens with Derby.

Product Version: NetBeans IDE Dev (Build 201502150001)
Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07
Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 MackSix 2015-02-16 13:22:49 UTC
This happens with a PostgreSQL connection too.
Comment 2 matthias42 2015-02-16 20:50:18 UTC
Ok - the problem looks like a race condition in the connection sequence.

This commit made the problem visible:

http://hg.netbeans.org/main-silver/rev/445492ab23fb

I asume this - the problem that was fixed by that problem  bug #249214 was the cause that it worked in the first place. In the mentioned bug getWarnings was causing long delays which triggered a slowness report. I'll have to cut through the mess of DatabaseConnector, DatabaseConnection, ConnectionNode and so on.

My gut feeling tells me, that there is some serious cleaning to be done.
Comment 3 matthias42 2015-02-20 19:00:31 UTC
The fix was committed as:

http://hg.netbeans.org/core-main/rev/cd53aceb3f28

Thank you for catching this. As always in the next few days a nightly build will be done, that includes this fix. I'd appreciate it if you could take for a spin and verify the fix.
Comment 4 Quality Engineering 2015-02-22 06:20:11 UTC
Integrated into 'main-silver', will be available in build *201502220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/cd53aceb3f28
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #250442: Simplify DatabaseConnection structure and connection sequence
Comment 5 MackSix 2015-02-24 06:03:27 UTC
It works fine. Verified.
Comment 6 Jiri Kovalsky 2015-02-24 09:59:34 UTC
Excellent cooperation between two excellent NetBeans community contributors proving that NetBeans is a true open source project. Thank you guys!