[teiid-commits] teiid SVN: r2447 - trunk/runtime/src/main/java/org/teiid/deployers.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Aug 11 16:15:01 EDT 2010


Author: shawkins
Date: 2010-08-11 16:15:01 -0400 (Wed, 11 Aug 2010)
New Revision: 2447

Modified:
   trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
Log:
TEIID-1191 minor cleanup of logic

Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java	2010-08-11 20:07:58 UTC (rev 2446)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java	2010-08-11 20:15:01 UTC (rev 2447)
@@ -273,7 +273,7 @@
     private void buildDynamicMetadataStore(final VFSDeploymentUnit unit, final VDBMetaData vdb, final MetadataStoreGroup vdbStore, final ConnectorManagerRepository cmr) throws DeploymentException {
     	
     	// make sure we are configured correctly first
-		for (Model model:vdb.getModels()) {
+		for (final ModelMetaData model:vdb.getModelMetaDatas().values()) {
 			if (model.getName().equals(CoreConstants.SYSTEM_MODEL) || model.getName().equals(CoreConstants.ODBC_MODEL)){
 				continue;
 			}
@@ -281,14 +281,6 @@
 	    	if (model.getSourceNames().isEmpty()) {
 	    		throw new DeploymentException(RuntimePlugin.Util.getString("fail_to_deploy", vdb.getName()+"-"+vdb.getVersion(), model.getName())); //$NON-NLS-1$ //$NON-NLS-2$
 	    	}
-		}
-
-    	// check the cache files first; if not found load the metadata
-    	for (Model m:vdb.getModels()) {
-    		final ModelMetaData model = (ModelMetaData)m;
-			if (model.getName().equals(CoreConstants.SYSTEM_MODEL) || model.getName().equals(CoreConstants.ODBC_MODEL)){
-				continue;
-			}
 			    	
 	    	final boolean cache = "cached".equalsIgnoreCase(vdb.getPropertyValue("UseConnectorMetadata")); //$NON-NLS-1$ //$NON-NLS-2$
 	    	final File cacheFile = buildCachedFileName(unit, vdb, model.getName());



More information about the teiid-commits mailing list