[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] moberhuber org.eclipse.tm.rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model SystemRegistry.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model
In directory dev2:/tmp/cvs-serv16292/src/org/eclipse/rse/internal/core/model

Modified Files:
      Tag: R3_3_maintenance
	SystemRegistry.java 
Log Message:
Bug 359573 - backport to 3.3.2: Regression: Changing saved user ID while connecting disconnects existing subsystems

Index: SystemRegistry.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/internal/core/model/SystemRegistry.java,v
retrieving revision 1.22
retrieving revision 1.22.4.1
diff -C2 -d -r1.22 -r1.22.4.1
*** SystemRegistry.java	3 Jul 2009 14:14:31 -0000	1.22
--- SystemRegistry.java	3 Oct 2011 01:48:03 -0000	1.22.4.1
***************
*** 1,4 ****
  /********************************************************************************
!  * Copyright (c) 2006, 2009 IBM Corporation and others. All rights reserved.
   * This program and the accompanying materials are made available under the terms
   * of the Eclipse Public License v1.0 which accompanies this distribution, and is
--- 1,4 ----
  /********************************************************************************
!  * Copyright (c) 2006, 2011 IBM Corporation and others. All rights reserved.
   * This program and the accompanying materials are made available under the terms
   * of the Eclipse Public License v1.0 which accompanies this distribution, and is
***************
*** 61,64 ****
--- 61,65 ----
   * Martin Oberhuber (Wind River) - [245154][api] add getSubSystemConfigurationProxiesBySystemType()
   * Zhou Renjian     (Kortide)    - [282238] NPE when copying host and overwrite itself
+  * Martin Oberhuber (Wind River) - [359554] Avoid disconnect when changing default user id only
   ********************************************************************************/
  
***************
*** 1966,1975 ****
  			for (int idx = 0; idx < subsystems.length; idx++)
  			{
! 				if (hostNameChanged || (subsystems[idx].getLocalUserId() == null))
  				{
  					try
  					{
! 						if (subsystems[idx].isConnected()) subsystems[idx].disconnect(); // MJB: added conditional for defect 45754
! 						if (defaultUserIdChanged)
  						{
  							subsystems[idx].getConnectorService().clearCredentials();
--- 1967,1981 ----
  			for (int idx = 0; idx < subsystems.length; idx++)
  			{
! 				//Need to clear caches if host name changed or user ID is inherited from default
! 				if (hostNameChanged || (subsystems[idx].getConnectorService().supportsUserId() && subsystems[idx].getLocalUserId() == null))
  				{
  					try
  					{
! 						//MOB - Bug 359554: There is no reason for disconnecting subsystems just because a default user ID changed
! 						if (hostNameChanged && subsystems[idx].isConnected())
! 						{
! 							subsystems[idx].disconnect(); // MJB: added conditional for defect 45754
! 						}
! 						if (defaultUserIdChanged && !subsystems[idx].isConnected())
  						{
  							subsystems[idx].getConnectorService().clearCredentials();