1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 20:15:22 +02:00

[306989] [dstore] workspace in strange condition if expanding projects during logon

This commit is contained in:
David McKnight 2010-03-25 18:02:21 +00:00
parent db54411058
commit 937e9abafa

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2002, 2009 IBM Corporation and others. * Copyright (c) 2002, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -38,6 +38,7 @@
* David McKnight (IBM) - [267236] [dstore] Can't connect after a wrong password * David McKnight (IBM) - [267236] [dstore] Can't connect after a wrong password
* David McKnight (IBM) - [274688] [api][dstore] DStoreConnectorService.internalConnect() needs to be cleaned up * David McKnight (IBM) - [274688] [api][dstore] DStoreConnectorService.internalConnect() needs to be cleaned up
* David McKnight (IBM) - [258529] Unable to display connection failure error message * David McKnight (IBM) - [258529] Unable to display connection failure error message
* David McKnight (IBM) - [306989] [dstore] workspace in strange condition if expanding projects during logon
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.connectorservice.dstore; package org.eclipse.rse.connectorservice.dstore;
@ -1300,54 +1301,58 @@ public class DStoreConnectorService extends StandardConnectorService implements
} }
_isConnecting = true; _isConnecting = true;
Boolean alertedNONSSL = new Boolean(false); try{
Boolean alertedNONSSL = new Boolean(false);
// set A_PLUGIN_PATH so that dstore picks up the property // set A_PLUGIN_PATH so that dstore picks up the property
setPluginPathProperty(); setPluginPathProperty();
// Fire comm event to signal state about to change // Fire comm event to signal state about to change
fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT); fireCommunicationsEvent(CommunicationsEvent.BEFORE_CONNECT);
ConnectionStatus connectStatus = null; ConnectionStatus connectStatus = null;
ConnectionStatus launchStatus = null; ConnectionStatus launchStatus = null;
clientConnection = new ClientConnection(getPrimarySubSystem().getHost().getAliasName()); clientConnection = new ClientConnection(getPrimarySubSystem().getHost().getAliasName());
clientConnection.setHost(getHostName()); clientConnection.setHost(getHostName());
clientConnection.setPort(Integer.toString(getPort())); clientConnection.setPort(Integer.toString(getPort()));
getPrimarySubSystem(); getPrimarySubSystem();
IRemoteServerLauncher serverLauncher = getDStoreServerLauncher(); IRemoteServerLauncher serverLauncher = getDStoreServerLauncher();
ServerLaunchType serverLauncherType = null; ServerLaunchType serverLauncherType = null;
if (serverLauncher != null){ if (serverLauncher != null){
serverLauncherType = serverLauncher.getServerLaunchType(); serverLauncherType = serverLauncher.getServerLaunchType();
} }
SystemSignonInformation info = getSignonInformation(); SystemSignonInformation info = getSignonInformation();
if (serverLauncherType == ServerLaunchType.REXEC_LITERAL){ // start the server via REXEC if (serverLauncherType == ServerLaunchType.REXEC_LITERAL){ // start the server via REXEC
connectStatus = connectWithREXEC(info, serverLauncher, monitor); connectStatus = connectWithREXEC(info, serverLauncher, monitor);
} }
else if (serverLauncherType == ServerLaunchType.DAEMON_LITERAL) { // start the server via the daemon else if (serverLauncherType == ServerLaunchType.DAEMON_LITERAL) { // start the server via the daemon
ConnectionStatusPair connectStatusPair = connectWithDaemon(info, serverLauncher, alertedNONSSL, monitor); ConnectionStatusPair connectStatusPair = connectWithDaemon(info, serverLauncher, alertedNONSSL, monitor);
connectStatus = connectStatusPair.getConnectStatus(); connectStatus = connectStatusPair.getConnectStatus();
launchStatus = connectStatusPair.getLaunchStatus(); launchStatus = connectStatusPair.getLaunchStatus();
} }
else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL){ // connect to running server else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL){ // connect to running server
connectStatus = connectWithRunning(monitor); connectStatus = connectWithRunning(monitor);
} }
else { // server launcher type is unknown else { // server launcher type is unknown
connectStatus = connectWithOther(clientConnection, info, serverLauncher, monitor); connectStatus = connectWithOther(clientConnection, info, serverLauncher, monitor);
} }
if (connectStatus != null && connectStatus.isConnected()){ // connected if (connectStatus != null && connectStatus.isConnected()){ // connected
initializeConnection(launchStatus, connectStatus, alertedNONSSL, monitor); initializeConnection(launchStatus, connectStatus, alertedNONSSL, monitor);
} }
else { // diagnosis, reconnection and other connection failure handling else { // diagnosis, reconnection and other connection failure handling
handleConnectionFailure(launchStatus, connectStatus, serverLauncher, serverLauncherType, monitor); handleConnectionFailure(launchStatus, connectStatus, serverLauncher, serverLauncherType, monitor);
} }
}
finally {
_isConnecting = false; _isConnecting = false;
}
} }
protected boolean isPortOutOfRange(String message) protected boolean isPortOutOfRange(String message)