[teiid-commits] teiid SVN: r1158 - in trunk: embedded/src/main/java/com/metamatrix/dqp/embedded/services and 3 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Tue Jul 21 12:14:06 EDT 2009


Author: rareddy
Date: 2009-07-21 12:14:06 -0400 (Tue, 21 Jul 2009)
New Revision: 1158

Modified:
   trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java
   trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
   trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
   trunk/embedded/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties
   trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
   trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
Log:
TEIID-652: Corrected issue such that if the default properties for the connector type are not found in the configuration.xml, then the default properties from the connector type object instantiated will be taken. Also, stream lined the loading of VDB during the initialization of the embedded configuration service similar to that of adding VDB through admin api, so that there is only one way to load a VDB.

Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java	2009-07-20 19:35:47 UTC (rev 1157)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/configuration/ServerConfigFileReader.java	2009-07-21 16:14:06 UTC (rev 1158)
@@ -34,6 +34,7 @@
 import java.util.Set;
 
 import com.metamatrix.common.config.api.ComponentType;
+import com.metamatrix.common.config.api.ComponentTypeDefn;
 import com.metamatrix.common.config.api.ComponentTypeID;
 import com.metamatrix.common.config.api.Configuration;
 import com.metamatrix.common.config.api.ConfigurationModelContainer;
@@ -41,7 +42,6 @@
 import com.metamatrix.common.config.api.exceptions.ConfigurationException;
 import com.metamatrix.common.config.model.BasicComponentType;
 import com.metamatrix.common.config.model.ConfigurationModelContainerAdapter;
-import com.metamatrix.common.object.PropertyDefinition;
 
 /**
  * This class loades the server configuration file <code>ServerConfig.xml</code>
@@ -151,11 +151,32 @@
     	}
     		
 		if (c != null && !c.isEmpty()) {
-			Set<PropertyDefinition> defns = new HashSet<PropertyDefinition>();
+			Set<ComponentTypeDefn> defns = new HashSet<ComponentTypeDefn>();
 			defns.addAll(c);
-			defns.addAll(type.getComponentTypeDefinitions());
+			
+			// Hashset does not add, if the object is already present in the collection through addall
+			// so they need to added one by one.
+			Collection<ComponentTypeDefn> overwriteDefns = type.getComponentTypeDefinitions();
+			for (ComponentTypeDefn pd:overwriteDefns) {
+				if (defns.contains(pd)) {
+					defns.remove(pd);
+				}
+				defns.add(pd);
+			}
+			
 			baseType.setComponentTypeDefinitions(defns);
 		}
 		return baseType;
+	}
+
+	public static boolean containsBinding(ConfigurationModelContainer configuration, String name) {
+        // Load connector bindings, do we ever need connector types?
+        Collection<ConnectorBinding> bindings = configuration.getConfiguration().getConnectorBindings();
+        for(ConnectorBinding binding:bindings) {
+        	if (binding.getFullName().equalsIgnoreCase(name)) {
+        		return true;
+        	}
+        }
+        return false;
 	}    
 }

Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java	2009-07-20 19:35:47 UTC (rev 1157)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java	2009-07-21 16:14:06 UTC (rev 1158)
@@ -345,17 +345,38 @@
         	vdbFile = getNewVDBLocation(srcVdb);
         	VDBConfigurationWriter.write(srcVdb, vdbFile);
         	srcVdb = VDBConfigurationReader.loadVDB(vdbFile, getDeployDir());
-        	try {
-				loadVDB(vdbFile, srcVdb);
-			} catch (ApplicationInitializationException e) {
-				throw new MetaMatrixComponentException(e);
-			}
+			deployVDB(vdbFile, srcVdb);
         	notifyVDBLoad(def.getName(), def.getVersion());
         } 
         
         DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.vdb_saved", new Object[] {def.getName(), def.getVersion(), vdbFile}); //$NON-NLS-1$
     }
 
+    private VDBArchive loadVDB(VDBArchive vdb, boolean replaceBindings) throws MetaMatrixComponentException {
+        // check if this is a valid VDB
+        if (!isValidVDB(vdb)) {
+        	throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("EmbeddedConfigurationService.invalid_vdb", vdb.getName())); //$NON-NLS-1$
+        }
+                                      
+        // add connector types from the VDB to the configuration
+        addConnectorTypesInVDB(vdb, replaceBindings);
+        
+        // now try to add the connector bindings in the VDB to the configuration service
+        addConnectorBindingsInVDB(vdb, replaceBindings);
+        
+        // make sure we have all the bindings, otherwise this is incomplete VDB
+        if (!isFullyConfiguredVDB(vdb)) {
+            // mark as in-active
+            vdb.setStatus(VDBStatus.INCOMPLETE);                                
+        }
+        else {
+            vdb.setStatus(VDBStatus.ACTIVE);
+            DQPEmbeddedPlugin.logInfo("VDBService.vdb_active", new Object[] {vdb.getName(), vdb.getVersion()}); //$NON-NLS-1$                                
+        }    	
+        
+        return vdb;
+    }
+    
     /**  
      * @see com.metamatrix.dqp.service.ConfigurationService#addVDB(com.metamatrix.common.vdb.api.VDBDefn, boolean)
      */
@@ -363,34 +384,16 @@
         if (vdb != null) {             
             boolean exists = false;
 
-            // check if this is a valid VDB
-            if (!isValidVDB(vdb)) {
-            	throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("EmbeddedConfigurationService.invalid_vdb", vdb.getName())); //$NON-NLS-1$
-            }
-            
             // check to see if we already have vdb with same name and version.
             VDBArchive existingVdb = getVDB(vdb.getName(), vdb.getVersion());
             if (existingVdb != null) {                
                 exists = true;
                 DQPEmbeddedPlugin.logWarning("VDBService.vdb_already_exists", new Object[] {existingVdb.getName(), existingVdb.getVersion()}); //$NON-NLS-1$ 
             } 
-                                    
-            // add connector types from the VDB to the configuration
-            addConnectorTypesInVDB(vdb, replaceBindings);
             
-            // now try to add the connector bindings in the VDB to the configuration service
-            addConnectorBindingsInVDB(vdb, replaceBindings);
+            // load the vdb an its connector bindings
+            vdb = loadVDB(vdb, replaceBindings);
             
-            // make sure we have all the bindings, otherwise this is incomplete VDB
-            if (!isFullyConfiguredVDB(vdb)) {
-                // mark as in-active
-                vdb.setStatus(VDBStatus.INCOMPLETE);                                
-            }
-            else {
-                vdb.setStatus(VDBStatus.ACTIVE);
-                DQPEmbeddedPlugin.logInfo("VDBService.vdb_active", new Object[] {vdb.getName(), vdb.getVersion()}); //$NON-NLS-1$                                
-            }
-            
             // Now save the VDB for future use using the Configuration.
             // configuration may alter the connector bindings on VDB based
             // upon preferences set.
@@ -429,7 +432,7 @@
             // as bindings are vdb scoped they will never find one, unless there is shared one, 
             // then we need to use that one
             if (existing == null || replace) {
-                saveConnectorBinding(deployedBindingName, binding);
+                saveConnectorBinding(deployedBindingName, binding, false);
             }
             else {
                 // if the not being replaced, need to use the current one, then
@@ -455,7 +458,7 @@
             ConnectorBindingType localType = getConnectorType(typeName);
             if (localType == null || replace) {
                 final ConnectorBindingType type = (ConnectorBindingType)types.get(typeName);
-                saveConnectorType(type);
+               	saveConnectorType(type, false);
             }                        
         } // for
     }
@@ -611,9 +614,8 @@
      * @param binding
      * @return properties for the connector binding given
      */   
-    public Properties getDefaultProperties(ConnectorBinding binding) { 
-        ComponentTypeID id = binding.getComponentTypeID();
-        return configurationModel.getDefaultPropertyValues(id);
+    public Properties getDefaultProperties(ConnectorBindingType type) { 
+        return configurationModel.getDefaultPropertyValues((ComponentTypeID)type.getID());
     }
     
     /**
@@ -674,7 +676,7 @@
             ComponentType type = getConnectorType(typeName);           
             if (type != null) {
                 // Ask the Configuration Manager to save the connector Binding
-                binding = saveConnectorBinding(deployedBindingName, binding);
+                binding = saveConnectorBinding(deployedBindingName, binding, true);
                 DQPEmbeddedPlugin.logInfo("DataService.Connector_Added", new Object[] {binding.getDeployedName()}); //$NON-NLS-1$                
                 return binding;
             }
@@ -688,13 +690,13 @@
      */
     public ConnectorBinding updateConnectorBinding(ConnectorBinding binding) 
         throws MetaMatrixComponentException {
-       return saveConnectorBinding(binding.getDeployedName(), binding); 
+       return saveConnectorBinding(binding.getDeployedName(), binding, false); 
     }
     
     /**
      * Save the Connector Binding to the internal list.  
      */
-    ConnectorBinding saveConnectorBinding(String deployedBindingName, ConnectorBinding binding) 
+    ConnectorBinding saveConnectorBinding(String deployedBindingName, ConnectorBinding binding, boolean updateConfiguration) 
         throws MetaMatrixComponentException {        
         
         if (binding != null) {         
@@ -707,9 +709,7 @@
             boolean used = (usedVDBs != null && !usedVDBs.isEmpty());
             if (used) {
                 for (VDBArchive vdb:usedVDBs) {
-                    // Defect 21396 - a call to addConnectorBinding is an implicit replace in case where the
-                    // binding already exists, so there should be to license check here because we're updating
-                    // all the deployed VDBs that are using this connector binding.
+
                 	BasicVDBDefn def = vdb.getConfigurationDef();
                 	def.addConnectorBinding(binding);
                 	
@@ -718,15 +718,20 @@
                 }
             }
             
-            this.configurationModel = ServerConfigFileWriter.addConnectorBinding(configurationModel, binding);
-            saveSystemConfiguration(this.configurationModel);
-            
-            DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.connector_save", new Object[] {deployedBindingName}); //$NON-NLS-1$            
+            if (updateConfiguration || isGlobalConnectorBinding(binding)) {
+	            this.configurationModel = ServerConfigFileWriter.addConnectorBinding(configurationModel, binding);
+	            saveSystemConfiguration(this.configurationModel);
+	            DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.connector_save", new Object[] {deployedBindingName}); //$NON-NLS-1$
+            }
         }        
         return binding;
     }
     
-    /** 
+    private boolean isGlobalConnectorBinding(ConnectorBinding binding) {
+    	return ServerConfigFileReader.containsBinding(this.configurationModel, binding.getFullName());
+	}
+
+	/** 
      * @see com.metamatrix.dqp.service.ConfigurationService#deleteConnectorBinding(java.lang.String)
      * @since 4.3
      */
@@ -839,14 +844,21 @@
      * @since 4.3
      */
     public void saveConnectorType(ConnectorBindingType type) throws MetaMatrixComponentException {
-        loadedConnectorTypes.put(type.getName(), ServerConfigFileReader.resolvePropertyDefns(type, this.configurationModel));
-
-        // Also add binding type to the configuration and save.        
-        DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.connector_type_save", new Object[] {type.getName()}); //$NON-NLS-1$
-        this.configurationModel = ServerConfigFileWriter.addConnectorType(configurationModel, type);
-        saveSystemConfiguration(this.configurationModel);                            
+    	saveConnectorType(type, true);
     }
+    
+    private void saveConnectorType(ConnectorBindingType type, boolean updateConfiguration) throws MetaMatrixComponentException {
+    	type = (ConnectorBindingType)ServerConfigFileReader.resolvePropertyDefns(type, this.configurationModel);
+        loadedConnectorTypes.put(type.getName(), type);
 
+        if (updateConfiguration) {
+	        // Also add binding type to the configuration and save.        
+	        DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.connector_type_save", new Object[] {type.getName()}); //$NON-NLS-1$
+	        this.configurationModel = ServerConfigFileWriter.addConnectorType(configurationModel, type);
+	        saveSystemConfiguration(this.configurationModel);
+        }
+    }    
+
     /** 
      * @see com.metamatrix.dqp.service.ConfigurationService#deleteConnectorType(java.lang.String)
      * @since 4.3
@@ -959,20 +971,17 @@
             
             // Add all the connector types.
             Map connectorTypes = configReader.getConnectorTypes();
-                        
+            
+            // load the connector bindings
+            loadConnectorBindings(connectorBindings, connectorTypes);
+            
             // Load the User defined functions 
             loadUDF();
                         
             // Find all the VDB File in the configuration
             // Load them the available VDBs
             loadVDBs();
-            
-            // load the connector bindings
-            loadConnectorBindings(connectorBindings, connectorTypes);
-            
-            // validate the VDBS and make them active if they are not already active based 
-            // on their binding status
-            validateVDBs(loadedVDBs.values());
+                        
         } catch (MetaMatrixComponentException e) {
             throw new ApplicationInitializationException(e);
         } 
@@ -1044,40 +1053,13 @@
 				binding.setDeployedName(binding.getFullName());
 			}
 			deployConnectorBinding(binding.getDeployedName(), binding);
-		}
- 	 	
-        // Loop through all the loaded VDBs and collect what connector bindings
-        // connector types are needed for the dqp to start.
-        for (VDBArchive vdb: loadedVDBs.values()) {
-            
-        	VDBDefn def = vdb.getConfigurationDef();
-        	
-            // load new connector types from vdb
-            for (Iterator it = def.getConnectorTypes().values().iterator(); it.hasNext();) {
-                ConnectorBindingType type= (ConnectorBindingType)it.next();
-                if (!loadedConnectorTypes.containsKey(type.getName())) {
-                    loadedConnectorTypes.put(type.getName(), ServerConfigFileReader.resolvePropertyDefns(type, this.configurationModel));
-                }
-            }                        
-            
-            // Load new bindings from the vdb
-            for (Iterator it = def.getConnectorBindings().values().iterator(); it.hasNext();) {
-                BasicConnectorBinding binding = (BasicConnectorBinding)it.next();
-                String deployName = binding.getDeployedName();
-                if (deployName == null) {
-                	deployName = binding.getFullName();
-                }
-                if (!loadedConnectorBindings.containsKey(deployName)) {
-                	deployConnectorBinding(deployName, binding);
-                }
-            }
-        }
+		} 	 	
     }
 
 
 
 	/** 
-     * Add the connnector binding with new deployment name
+     * Add the connector binding with new deployment name
      * @param binding
      * @param deployedName
      */
@@ -1096,6 +1078,7 @@
         deployedBinding.setDeployedName(deployedName);
         loadedConnectorBindings.put(deployedName, deployedBinding);
         notifyConnectorBindingLoad(deployedName);
+        DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.connector_binding_deployed", new Object[] {deployedName}); //$NON-NLS-1$        
         return deployedBinding;
     }
                 
@@ -1105,7 +1088,7 @@
      * @throws ApplicationInitializationException
      * @since 4.3
      */
-    void loadVDBs() throws ApplicationInitializationException{
+    void loadVDBs() throws ApplicationInitializationException, MetaMatrixComponentException {
         // Get the files to load
         HashMap<URL, VDBArchive> vdbFiles;
 		try {
@@ -1119,20 +1102,19 @@
             VDBArchive vdb = vdbFiles.get(vdbURL);
             
             if (vdb != null) {
-            
-                loadVDB(vdbURL, vdb);
+            	// Check to make sure there are two identical VDBs with same version 
+        		// being loaded into DQP
+        		if (getVDB(vdb.getName(), vdb.getVersion()) != null) {
+        		    throw new ApplicationInitializationException(DQPEmbeddedPlugin.Util.getString("EmbeddedConfigurationService.duplicate_vdb_found", new Object[] {vdbURL})); //$NON-NLS-1$
+        		}
+            	
+            	vdb = loadVDB(vdb, false);
+                deployVDB(vdbURL, vdb);
             }
         }
     }
 
-	private void loadVDB(URL vdbURL, VDBArchive vdb)
-			throws ApplicationInitializationException {
-		// Check to make sure there are two identical VDBs with same version 
-		// being loaded into DQP
-		if (loadedVDBs.get(vdbId(vdb)) != null) {
-		    throw new ApplicationInitializationException(DQPEmbeddedPlugin.Util.getString("EmbeddedConfigurationService.duplicate_vdb_found", new Object[] {vdbURL})); //$NON-NLS-1$
-		}
-		
+	private void deployVDB(URL vdbURL, VDBArchive vdb) {		
 		// add vdb to loaded VDBS
 		loadedVDBs.put(vdbId(vdb), vdb);
 		availableVDBFiles.put(vdbId(vdb), vdbURL);
@@ -1285,23 +1267,7 @@
             DQPEmbeddedPlugin.logError(e, "EmbeddedConfigurationService.vdb_delete_failed", new Object[] {vdbName, vdbVersion}); //$NON-NLS-1$
         }
     }
-    
-   
-    /**
-     * Validate all the VDBs and make them active 
-     * @param vdbs
-     * @since 4.3.2
-     */
-    void validateVDBs(Collection<VDBArchive> vdbList) throws MetaMatrixComponentException {
-        for (VDBArchive vdb:vdbList) {
-            if (vdb.getStatus() != VDBStatus.ACTIVE && vdb.getStatus() != VDBStatus.ACTIVE_DEFAULT &&
-            		isValidVDB(vdb) && isFullyConfiguredVDB(vdb)) {
-                vdb.setStatus(VDBStatus.ACTIVE);
-                DQPEmbeddedPlugin.logInfo("VDBService.vdb_loded", new Object[] {vdb.getName(), vdb.getVersion()}); //$NON-NLS-1$                                
-            }
-        }
-    }
-    
+          
     public boolean isFullyConfiguredVDB(VDBArchive vdb) throws MetaMatrixComponentException{
     	VDBDefn def = vdb.getConfigurationDef();
     	Collection models = def.getModels();

Modified: trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java
===================================================================
--- trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java	2009-07-20 19:35:47 UTC (rev 1157)
+++ trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedDataService.java	2009-07-21 16:14:06 UTC (rev 1158)
@@ -47,6 +47,7 @@
 import com.metamatrix.common.config.api.ComponentTypeDefn;
 import com.metamatrix.common.config.api.ComponentTypeID;
 import com.metamatrix.common.config.api.ConnectorBinding;
+import com.metamatrix.common.config.api.ConnectorBindingType;
 import com.metamatrix.common.util.crypto.CryptoException;
 import com.metamatrix.common.util.crypto.CryptoUtil;
 import com.metamatrix.common.vdb.api.VDBArchive;
@@ -130,7 +131,7 @@
     	VDBService vdbService = (VDBService)this.lookupService(DQPServiceNames.VDB_SERVICE);
     	List<String> bindingNames = vdbService.getConnectorBindingNames(vdbName, vdbVersion, modelName);
     	if (bindingNames.isEmpty()) {
-    		throw new MetaMatrixComponentException("No connectors defined for binding");
+    		throw new MetaMatrixComponentException(DQPEmbeddedPlugin.Util.getString("DataService.no_connectors_defined")); //$NON-NLS-1$
     	}
     	String deployedConnectorBindingName = bindingNames.get(0);
     	ConnectorID connector = selectConnector(deployedConnectorBindingName);
@@ -505,23 +506,23 @@
         Properties decryptedProperties = new Properties();        
         
         // Get all the default properties for the connector type, so that
-        // if the connector binding does not have all the proeprties then these
+        // if the connector binding does not have all the properties then these
         // will take over, otherwise the connector binding ones overwrite
         ComponentTypeID id = binding.getComponentTypeID();
-        ComponentType type = getConfigurationService().getConnectorType(id.getName());
-        
-        Properties props = getConfigurationService().getDefaultProperties(binding);
-        if (props == null || props.isEmpty()) {
-            ComponentType defaultType = getConfigurationService().getConnectorType("Connector"); //$NON-NLS-1$
-            if (defaultType != null) {
-                props = defaultType.getDefaultPropertyValues();
-            }
+        ConnectorBindingType type = getConfigurationService().getConnectorType(id.getName());
+
+        // Index connector has no formal definition in the configuration file. 
+        if (type != null) {
+	        Properties props = getConfigurationService().getDefaultProperties(type);
+	        if (props == null || props.isEmpty()) {
+	        	props = type.getDefaultPropertyValues();
+	        }
+	        
+	        if (props != null && !props.isEmpty()) {
+	            decryptedProperties.putAll(props);
+	        }
         }
         
-        if (props != null && !props.isEmpty()) {
-            decryptedProperties.putAll(props);
-        }
-        
         // now overlay the custom properties from the default properties.
         decryptedProperties.putAll(bindingProperties);
         

Modified: trunk/embedded/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties
===================================================================
--- trunk/embedded/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties	2009-07-20 19:35:47 UTC (rev 1157)
+++ trunk/embedded/src/main/resources/com/metamatrix/dqp/embedded/i18n.properties	2009-07-21 16:14:06 UTC (rev 1158)
@@ -105,6 +105,7 @@
 DataService.ext_module_not_found=Required extension module {0} not found in the extensions directory. if not using extension modules ignore.
 DataService.Connector_still_used=Connector Binding {0} can not be deleted because it is still in use by VDBs. Remove the assosiation with VDB before deletion.
 DataService.Connector_failed_start=Connector Binding {0} failed to start, check the properties and start again.
+DataService.no_connectors_defined=No connectors defined for binding
 Failed_To_Service=Failed to get service requested
 
 VDBReader.Invalid_location=Invalid file location \"{0}\". No VDB files (*.DEF) found
@@ -147,6 +148,7 @@
 EmbeddedConfigurationService.udf_unload=User Defined Functions file unloaded
 EmbeddedConfigurationService.bindings_exceeded_limit=VDB {1} has {0} connector bindings, that exceeds MetaMatrix license allowed number of connector bindings.
 EmbeddedConfigurationService.Invalid_connector_binding=Can not assign binding "{2}" to VDB "{0}" with "{1}", because it is a private binding from another vdb. 
+EmbeddedConfigurationService.connector_binding_deployed=Connector binding {0} deployed
 
 ExtensionModuleReader.ext_module_failed_to_read=failed to read the extension module \"{0}\" from file system.
 ExtensionModuleReader.ext_module_does_not_exist=Extension module \"{0}\" does not exist in the configuration

Modified: trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java
===================================================================
--- trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java	2009-07-20 19:35:47 UTC (rev 1157)
+++ trunk/embedded/src/test/java/com/metamatrix/dqp/embedded/services/TestEmbeddedConfigurationService.java	2009-07-21 16:14:06 UTC (rev 1158)
@@ -356,7 +356,7 @@
         BasicConnectorBinding binding = (BasicConnectorBinding)service.getConnectorBinding("QT_ORA9DS_1.BQT2 Oracle 9i Simple Cap"); //$NON-NLS-1$
         binding.setDescription(msg);
         
-        service.saveConnectorBinding(binding.getFullName(), binding);
+        service.saveConnectorBinding(binding.getFullName(), binding, true);
         
         // Test and make sure the VDB updated
         VDBArchive vdb = service.getVDB("QT_Ora9DS", "1"); //$NON-NLS-1$ //$NON-NLS-2$

Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java	2009-07-20 19:35:47 UTC (rev 1157)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/ConfigurationService.java	2009-07-21 16:14:06 UTC (rev 1158)
@@ -179,11 +179,11 @@
         throws MetaMatrixComponentException;
 
     /**
-     * Get the default properties for the Connector binding 
-     * @param binding
+     * Get the default properties for the Connector type 
+     * @param type
      * @return properties
      */
-    public Properties getDefaultProperties(ConnectorBinding binding);
+    public Properties getDefaultProperties(ConnectorBindingType type);
     
     /** 
      * Update the Connector Binding, the assumption here that we kept the name same 



More information about the teiid-commits mailing list