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.
Following this recipe: DatabaseConnection dbc = ConnectionManager.getDefault().getConnection(databaseConnectionName); ConnectionManager.getDefault().showConnectionDialog(dbc); Connection conn = dbc.getJDBCConnection(true); When running on EDT, DatabaseConnection.getJDBCConnection emits a warning about not calling it on EDT. OK. When running outside EDT (a RequestProcessor or similar), ConnectionManager.showConnectionDialog runs fine, but creates a race condition, since its dialog's setVisible is not called on EDT and returns immediately. Since DatabaseConnection.getJDBCConnection warns me about using EDT, ConnectionManager.showConnectionDialog must do the same (IMHO), since this behaviour is not explicit on its documentation.
In DatabaseConnection#showConnectionDialog (around line 1233) the EDT relevant part is dispatched into the EDT via Mutex.EVENT#readAccess.