Author: rareddy
Date: 2012-04-30 14:23:28 -0400 (Mon, 30 Apr 2012)
New Revision: 4044
Modified:
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
Log:
TEIID-2021: Adding a check to validate the translator used in the VDB for its
availability.
Modified: branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java
===================================================================
---
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2012-04-30
15:04:19 UTC (rev 4043)
+++
branches/8.0.x/jboss-integration/src/main/java/org/teiid/jboss/VDBDeployer.java 2012-04-30
18:23:28 UTC (rev 4044)
@@ -115,6 +115,19 @@
}
}
+ // make sure the translator defined exists in configuration.
+ for (ModelMetaData model:deployment.getModelMetaDatas().values()) {
+ if (model.isSource() && !model.getSourceNames().isEmpty()) {
+ for (String source:model.getSourceNames()) {
+ String translatorName = model.getSourceTranslatorName(source);
+ Translator parent =
this.translatorRepository.getTranslatorMetaData(translatorName);
+ if ( parent == null) {
+ throw new
DeploymentUnitProcessingException(IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50077,
translatorName, deploymentName));
+ }
+ }
+ }
+ }
+
// check if this is a VDB with index files, if there are then build the
TransformationMetadata
UDFMetaData udf = deploymentUnit.removeAttachment(TeiidAttachments.UDF_METADATA);
if (udf != null) {
Show replies by date