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 152048 - DatabaseNodeInfo.refreshChildren() can not be called on the event thread
Summary: DatabaseNodeInfo.refreshChildren() can not be called on the event thread
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Vancouvering
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-31 22:55 UTC by David Vancouvering
Modified: 2008-12-11 22:28 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 David Vancouvering 2008-10-31 22:55:33 UTC
It was never a good idea to call refreshChildren() on the event thread as it goes to the database.  But recent changes
to the refresh logic can cause exceptions to be thrown when this is done.  In particular, initChildren() for many
subclasses of DatabaseNodeInfo now call DatabaseConnection.getJDBCConnection(test), which throws an exception if it's
called on the event thread.

To fix this, we need to check and see if refreshChildren() is being called on the event thread, and if so, run it on a
background thread.
Comment 1 David Vancouvering 2008-10-31 22:59:32 UTC
455ccd51237a
Comment 2 Quality Engineering 2008-11-01 05:09:08 UTC
Integrated into 'main-golden', will be available in build *200811010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/455ccd51237a
User: David Van Couvering <davidvc@netbeans.org>
Log: #152048: DatabaseNodeInfo.refreshChildren() can not be called on the event thread
Comment 3 Roman Mostyka 2008-11-05 19:28:03 UTC
Verified.
Comment 4 rbalada 2008-11-14 13:00:45 UTC
I've transplanted the changeset http://hg.netbeans.org/main/rev/455ccd51237a into release65_fixes repository as
http://hg.netbeans.org/release65_fixes/rev/040b48f2dabb