[teiid-commits] teiid SVN: r1784 - branches/JCA/runtime/src/main/java/org/teiid/deployers.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Jan 27 16:57:58 EST 2010


Author: rareddy
Date: 2010-01-27 16:57:58 -0500 (Wed, 27 Jan 2010)
New Revision: 1784

Modified:
   branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
Log:
TEIID-833, TEIID-838, Avoid the NPE during the undeploy

Modified: branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java	2010-01-27 15:35:58 UTC (rev 1783)
+++ branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java	2010-01-27 21:57:58 UTC (rev 1784)
@@ -163,10 +163,15 @@
 	public void undeploy(DeploymentUnit unit, VDBMetaData deployment) {
 		super.undeploy(unit, deployment);
 		
-		this.vdbRepository.removeVDB(deployment.getName(), deployment.getVersion());
-		// remove any vdb specific context cache
-		this.contextCache.removeVDBScopedCache(deployment.getName(), deployment.getVersion());
-				
+		if (this.vdbRepository != null) {
+			this.vdbRepository.removeVDB(deployment.getName(), deployment.getVersion());
+		}
+		
+		if (this.contextCache != null) {
+			// remove any vdb specific context cache
+			this.contextCache.removeVDBScopedCache(deployment.getName(), deployment.getVersion());			
+		}
+
 		log.info("VDB = "+deployment + " undeployed");
 	}
 



More information about the teiid-commits mailing list