Skip to content

Commit

Permalink
TEIIDDES-1944: check jboss server prior to refreshing teiid instance
Browse files Browse the repository at this point in the history
* Avoids throwing an exception when refreshing a stopped teiid instance
* Displays sensible error message instead
  • Loading branch information
Paul Richardson committed Dec 2, 2013
1 parent a504cbe commit 1dab1ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ serverInvalidUrlMsg = The value "{0}" is not a valid Teiid URL
serverRefreshActionText = Refresh
serverRefreshActionToolTip = Refresh the selected Teiid Instance
serverRefreshNoServer = No server selected to be refreshed
serverRefreshParentNotConnected = The Teiid Instance cannot be refreshed since its parent JBoss Server "{0}" is not started
serverRefreshServerSuccessful = Server connection refreshed

serverDisconnectActionText = Disconnect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ else if (this.selectedServer == null) {

@Override
public void run() {
if (! selectedServer.isParentConnected()) {
WidgetUtil.showError(UTIL.getString("serverRefreshParentNotConnected", selectedServer.getParent())); //$NON-NLS-1$
return;
}

selectedServer.reconnect();

if (selectedServer.getConnectionError() != null)
WidgetUtil.showError(selectedServer.getConnectionError());
else
Expand Down

0 comments on commit 1dab1ee

Please sign in to comment.