[teiid-commits] teiid SVN: r899 - trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Sat May 9 00:59:47 EDT 2009


Author: vhalbert at redhat.com
Date: 2009-05-09 00:59:46 -0400 (Sat, 09 May 2009)
New Revision: 899

Modified:
   trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLConfigurationMgr.java
Log:
Teiid 442 - simplifying configuration mechanics.   Needed to add a check in the finally block in cases when the connection was not made and therefore the close shouldn't be called

Modified: trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLConfigurationMgr.java
===================================================================
--- trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLConfigurationMgr.java	2009-05-08 23:40:10 UTC (rev 898)
+++ trunk/server/src/main/java/com/metamatrix/platform/config/spi/xml/XMLConfigurationMgr.java	2009-05-09 04:59:46 UTC (rev 899)
@@ -169,12 +169,14 @@
 		} catch (ConfigObjectsNotResolvableException e) {
 			throw new ConfigurationException(e, ConfigMessages.CONFIG_0120,ConfigPlugin.Util.getString(ConfigMessages.CONFIG_0120, cmc.getConfigurationID()));
 		} finally {
-			try {
-				if (!success && pc != null) {
-					pc.rollback();
+			if (pc != null) {
+				try {
+					if (!success && pc != null) {
+						pc.rollback();
+					}
+				} finally {
+					pc.close();
 				}
-			} finally {
-				pc.close();
 			}
 		}
 




More information about the teiid-commits mailing list