Author: vhalbert(a)redhat.com
Date: 2009-05-25 12:32:46 -0400 (Mon, 25 May 2009)
New Revision: 997
Modified:
trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java
trunk/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java
Log:
Teiid-627 : added support for pre 6.0 connector types, to look for the old connector
class path variable when the new classpath variable is not found.
Modified:
trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java
===================================================================
---
trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java 2009-05-22
18:41:01 UTC (rev 996)
+++
trunk/common-internal/src/main/java/com/metamatrix/common/config/api/ConnectorBindingType.java 2009-05-25
16:32:46 UTC (rev 997)
@@ -40,6 +40,9 @@
public static final String CONNECTOR_CLASS =
"ConnectorClass";//$NON-NLS-1$
public static final String MM_JAR_PROTOCOL = "extensionjar";
//$NON-NLS-1$
public static final String CONNECTOR_TYPE_CLASSPATH =
"ConnectorTypeClassPath"; //$NON-NLS-1$
+
+ public static final String CONNECTOR_CLASSPATH_PRE_6 =
"ConnectorClassPath"; //$NON-NLS-1$
+
}
/**
Modified:
trunk/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java
===================================================================
---
trunk/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java 2009-05-22
18:41:01 UTC (rev 996)
+++
trunk/common-internal/src/main/java/com/metamatrix/common/config/model/BasicConnectorBindingType.java 2009-05-25
16:32:46 UTC (rev 997)
@@ -94,8 +94,24 @@
modules.add(jarFile);
}
}
+ } else {
+ // This is a pre-6 campatibility to support connector types that use the old
classpath variable.
+
+ classPath = getDefaultValue(Attributes.CONNECTOR_CLASSPATH_PRE_6);
+ if (classPath != null) {
+ StringTokenizer st = new StringTokenizer(classPath, ";");
//$NON-NLS-1$
+ while (st.hasMoreTokens()) {
+ String path = st.nextToken();
+ int idx = path.indexOf(Attributes.MM_JAR_PROTOCOL);
+ if (idx != -1) {
+ String jarFile = path.substring(idx +
Attributes.MM_JAR_PROTOCOL.length() + 1);
+ modules.add(jarFile);
+ }
+ }
+ }
+
}
return (String[])modules.toArray(new String[modules.size()]);
}
-
+
}
Show replies by date