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 134379 - Connecting to MySQL in EDT
Summary: Connecting to MySQL in EDT
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Rails (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-02 09:39 UTC by Erno Mononen
Modified: 2011-01-28 20:11 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 Erno Mononen 2008-05-02 09:39:16 UTC
Should use DatabaseServer#connectAsync instead of DatabaseServer#connect in JdbcConnectionsPanel.
Comment 1 Erno Mononen 2008-09-11 16:34:52 UTC
I'd need a way to notify the user if connecting is not successful, the reconnectAsync method doesn't seem to provide 
any means for that. David, would you have any tips?
Comment 2 David Vancouvering 2008-09-11 16:50:54 UTC
Well, what you can do is run the connect on a background task and if you get an error, you can post a dialog saying the
connection was not successful.

Or if you prefer you can run it on a background task so that the IDE doesn't freeze, but have a modal dialog with a
progress bar saying something like "Please wait while the connection is established."

Comment 3 Erno Mononen 2008-09-11 17:19:21 UTC
Thanks David for the tips. I don't know why but I somehow thought that the plain reconnect method has to be called in 
EDT (which is obviously not the case) and was looking for a reconnectAsync method that would return a future of some 
sort (and maybe also throw an exception like the reconnect method). But posting the invocation of reconnect to another 
thread should work fine for me.