/// <summary> Configure the launcher from the provided properties, system name /// /// </summary> /// <param name="launcher">The launcher to configure /// </param> /// <param name="systemName">The name of the system we're configuring /// </param> /// <param name="props">The Properties object with our configuration information /// </param> /// <throws> IllegalArgumentException if a required parameter is missing </throws> /// <throws> MigrationException if there is problem setting the context into the launcher </throws> //UPGRADE_ISSUE: Class hierarchy differences between 'java.util.Properties' and 'System.Collections.Specialized.NameValueCollection' may cause compilation errors. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1186'" private void configureFromMigrationProperties(DistributedAdoMigrationLauncher launcher, System.String systemName, System.Collections.Specialized.NameValueCollection props) { // Get the name of the context to use for our patch information System.String patchStoreContextName = null;//getRequiredParam(props, systemName + ".context"); // Set up the data source /* TODO dataSource.DriverClass = getRequiredParam(props, patchStoreContextName + ".ado.driver"); dataSource.DatabaseUrl = getRequiredParam(props, patchStoreContextName + ".ado.url"); dataSource.Username = getRequiredParam(props, patchStoreContextName + ".ado.username"); dataSource.Password = getRequiredParam(props, patchStoreContextName + ".ado.password"); */ // Get any post-patch task paths launcher.PostPatchPath = props.Get(patchStoreContextName + ".postpatch.path"); // Set up the ADO migration context; accepts one of two property names DataSourceMigrationContext context = DataSourceMigrationContext; System.String databaseType = null;// getRequiredParam(props, patchStoreContextName + ".ado.database.type", patchStoreContextName + ".ado.dialect"); context.DatabaseType = new DatabaseType(databaseType); // Finish setting up the context context.SystemName = systemName; //context.DataSource = dataSource; // done reading in config, set launcher's context launcher.AddContext(context); // Get our controlled systems, and instantiate their launchers //UPGRADE_TODO: Class 'java.util.HashMap' was converted to 'System.Collections.Hashtable' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilHashMap'" System.Collections.Hashtable controlledSystems = new System.Collections.Hashtable(); System.String[] controlledSystemNames = null;// getRequiredParam(props, systemName + ".controlled.systems").split(","); for (int i = 0; i < controlledSystemNames.Length; i++) { log.Info("Creating controlled migration launcher for system " + controlledSystemNames[i]); AdoMigrationLauncherFactory factory = AdoMigrationLauncherFactoryLoader.createFactory(); AdoMigrationLauncher subLauncher = factory.createMigrationLauncher(controlledSystemNames[i]); controlledSystems[controlledSystemNames[i]] = subLauncher; // Make sure the controlled migration process gets migration events //launcher.MigrationProcess.addListener(subLauncher); launcher.MigrationProcess.MigrationStarted += new MigrationProcess.MigrationStatusEventHandler(subLauncher.MigrationStarted); launcher.MigrationProcess.MigrationSuccessful += new MigrationProcess.MigrationStatusEventHandler(subLauncher.MigrationSuccessful); launcher.MigrationProcess.MigrationFailed += new MigrationProcess.MigrationStatusEventHandler(subLauncher.MigrationFailed); } // communicate our new-found controlled systems to the migration process // TODO ((DistributedMigrationProcess)launcher.MigrationProcess).ControlledSystems = null;// controlledSystems; }