Author: rareddy
Date: 2009-09-18 19:19:43 -0400 (Fri, 18 Sep 2009)
New Revision: 1416
Modified:
branches/6.2.x/build/kit-runtime/deploy.properties
branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
Log:
TEIID-842: Adding "dqp.config" property back. Fixed minor issue with connector
type updating, as it was being updated when it is not required to.
Modified: branches/6.2.x/build/kit-runtime/deploy.properties
===================================================================
--- branches/6.2.x/build/kit-runtime/deploy.properties 2009-09-18 22:50:39 UTC (rev 1415)
+++ branches/6.2.x/build/kit-runtime/deploy.properties 2009-09-18 23:19:43 UTC (rev 1416)
@@ -15,6 +15,9 @@
#Path to instance specific temporary information for caching, buffering, and
transactions
dqp.workdir=./work
+#Path to the Teiid Configuration file (manages connector types and shared connector
bindings)
+dqp.configFile=./deploy/configuration.xml
+
#Jars to load, which will be available to all services: UDFs, command logging, etc.
#dqp.extension.CommonClasspath=extensionjar:x.jar,extensionjar:y.jar
Modified:
branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java
===================================================================
---
branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-18
22:50:39 UTC (rev 1415)
+++
branches/6.2.x/runtime/src/main/java/com/metamatrix/dqp/embedded/admin/DQPConfigAdminImpl.java 2009-09-18
23:19:43 UTC (rev 1416)
@@ -208,7 +208,7 @@
}
// now that all of the input parameters validated, add the connector binding
- binding = addConnectorBinding(deployName, binding, ctype, true);
+ binding = addConnectorBinding(deployName, binding, ctype, false);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
@@ -266,10 +266,14 @@
ConnectorBindingType type =
ConnectorConfigurationReader.loadConnectorType(xmlFile);
// Check if the binding type exists already, if does take action based on
user
- // preferences in the admin options, same rules apply as binding.
+ // preferences in the admin options, same rules apply as binding.
+ boolean addType = true;
if (bindingTypeExists(type.getName())) {
if (options.containsOption(AdminOptions.OnConflict.EXCEPTION)) {
throw new
AdminProcessingException(DQPEmbeddedPlugin.Util.getString("Admin.addBinding_type_exists",
deployName, type.getName())); //$NON-NLS-1$
+ }
+ else if (options.containsOption(AdminOptions.OnConflict.IGNORE)) {
+ addType = false;
}
}
@@ -285,7 +289,7 @@
}
// now that all of the input parameters validated, add the connector binding
- binding = addConnectorBinding(deployName, binding, type, true);
+ binding = addConnectorBinding(deployName, binding, type, addType);
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);
@@ -302,7 +306,7 @@
* @param options
* @throws AdminException
*/
- ConnectorBinding addConnectorBinding(String deployName, ConnectorBinding binding,
ConnectorBindingType type, boolean replace)
+ ConnectorBinding addConnectorBinding(String deployName, ConnectorBinding binding,
ConnectorBindingType type, boolean addType)
throws AdminException {
// Make sure we have both correctly configured
if (type != null && binding != null) {
@@ -310,11 +314,11 @@
try {
// First add the connector type if one is not already in here.
- if (getConfigurationService().getConnectorType(type.getName()) ==
null || replace) {
+ if (getConfigurationService().getConnectorType(type.getName()) ==
null || addType) {
saveConnectorType(type);
}
// Now add the connector binding.
- binding = getConfigurationService().addConnectorBinding(deployName,
binding, replace);
+ binding = getConfigurationService().addConnectorBinding(deployName,
binding, true);
return binding;
} catch (MetaMatrixComponentException e) {
throw new AdminComponentException(e);