When I have to reconnect to a broken database connection (Control + Alt + T) which supports catalogs, in the catalog combo box is still the last selected catalog shown - b u t it is loaded the default catalog.
I think it is because this piece of code in SQLConnectionState.java
try
{
_catalog = conn.getCatalog();
}
catch (SQLException ex)
{
/*
* i18n [SQLConnectionState.errorSavingCatalog]
"Error saving current catalog.\n" +
"This might happen when reconnecting a Session to restore a broken connection.\n" +
"The new connection will use the default catalog.";
*/
String msg = s_stringMgr.getString("SQLConnectionState.errorSavingCatalog");
s_log.error(msg, ex);
if (msgHandler == null)
{
throw ex;
}
msgHandler.showErrorMessage(msg);
}
Sure if the connection is broken java.sql.Connection#getCatalog() won't work. Perhaps it is possible to set in the catch block the catalog to the selected value in the catalog ComboBox
Is fixed in our Git repository. Will be available in future snapshots and versions.