[teiid-commits] teiid SVN: r1030 - in branches/6.1.x: engine/src/main/java/org/teiid/dqp/internal/datamgr/impl and 1 other directories.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Mon Jun 8 11:51:34 EDT 2009


Author: shawkins
Date: 2009-06-08 11:51:34 -0400 (Mon, 08 Jun 2009)
New Revision: 1030

Modified:
   branches/6.1.x/build/
   branches/6.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
   branches/6.1.x/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
Log:
TEIID-646 expanding upon the legacy failed message.


Property changes on: branches/6.1.x/build
___________________________________________________________________
Name: svn:ignore
   - target

   + target

.classpath

.project

.settings


Modified: branches/6.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java
===================================================================
--- branches/6.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java	2009-06-08 14:20:38 UTC (rev 1029)
+++ branches/6.1.x/engine/src/main/java/org/teiid/dqp/internal/datamgr/impl/ConnectorManager.java	2009-06-08 15:51:34 UTC (rev 1030)
@@ -404,10 +404,13 @@
 				} else {
 					try {
 						Class legacyConnector = classloader.loadClass("com.metamatrix.data.api.Connector"); //$NON-NLS-1$
+						if (!legacyConnector.isAssignableFrom(o.getClass())) {
+							throw new ApplicationLifecycleException(DQPPlugin.Util.getString("failed_legacy", connectorClassName)); //$NON-NLS-1$
+						}
 						c = (Connector)ReflectionHelper.create("com.metamatrix.dqp.internal.datamgr.ConnectorWrapper", new Object[] {o}, new Class[] {legacyConnector}, classloader); //$NON-NLS-1$
 						this.isXa = classloader.loadClass("com.metamatrix.data.xa.api.XAConnector").isAssignableFrom(o.getClass()); //$NON-NLS-1$
 					} catch (ClassNotFoundException e) {
-						throw new ApplicationLifecycleException(e, DQPPlugin.Util.getString("failed_find_Connector_class", connectorClassName)); //$NON-NLS-1$
+						throw new ApplicationLifecycleException(e, DQPPlugin.Util.getString("failed_legacy", connectorClassName)); //$NON-NLS-1$
 					} 
 				}
 			} catch (MetaMatrixCoreException e) {

Modified: branches/6.1.x/engine/src/main/resources/com/metamatrix/dqp/i18n.properties
===================================================================
--- branches/6.1.x/engine/src/main/resources/com/metamatrix/dqp/i18n.properties	2009-06-08 14:20:38 UTC (rev 1029)
+++ branches/6.1.x/engine/src/main/resources/com/metamatrix/dqp/i18n.properties	2009-06-08 15:51:34 UTC (rev 1030)
@@ -37,7 +37,8 @@
 ConnectorManagerImpl.Initializing_connector=Initializing connector {0}
 ConnectorManagerImpl.Couldn__t_parse_property=Could not parse property: {0}
 Error_closing_client_connection=Error closing client connection in ConnectorManager
-failed_find_Connector_class=Could not find Connector class {0}
+failed_find_Connector_class=Could not find Connector class {0}
+failed_legacy=The specified connector class {0} is not an instance of a Teiid connector.  This may be due to an inappropriate classpath entry.  An attempt was also made to treat the class as a legacy MetaMatrix connector, however this was not successful either.
 failed_instantiate_Connector_class=Could not instantiate Connector class {0}
 failed_start_Connector=Could not start Connector {0}. {1}
 ConnectorManagerImpl.request_inactive_for_cancel=RequestID {0} is not active and the cancel request will not be processed.




More information about the teiid-commits mailing list