Author: rareddy
Date: 2010-02-04 18:51:45 -0500 (Thu, 04 Feb 2010)
New Revision: 1802
Modified:
branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
Log:
TEIID-502: Fixing the error deploying the UDF
Modified: branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-02-04
23:09:58 UTC (rev 1801)
+++ branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-02-04
23:51:45 UTC (rev 1802)
@@ -77,7 +77,7 @@
// check if this is a VDB with index files, if there are then build the
TransformationMetadata
IndexMetadataFactory indexFactory = unit.getAttachment(IndexMetadataFactory.class);
- UDFMetaData udf = unit.removeAttachment(UDFMetaData.class);
+ UDFMetaData udf = unit.getAttachment(UDFMetaData.class);
if (indexFactory != null) {
Map<VirtualFile, Visibility> visibilityMap =
indexFactory.getEntriesPlusVisibilities();
metadata = buildTransformationMetaData(deployment, visibilityMap, store, udf);
@@ -89,6 +89,7 @@
// add the metadata objects as attachments
deployment.removeAttachment(IndexMetadataFactory.class);
+ deployment.removeAttachment(UDFMetaData.class);
deployment.addAttchment(QueryMetadataInterface.class, metadata);
deployment.addAttchment(CompositeMetadataStore.class, metadata.getMetadataStore());
Modified: branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java
===================================================================
---
branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-02-04
23:09:58 UTC (rev 1801)
+++
branches/JCA/runtime/src/main/java/org/teiid/deployers/VDBParserDeployer.java 2010-02-04
23:51:45 UTC (rev 1802)
@@ -141,7 +141,7 @@
// If the UDF file is enclosed then attach it to the deployment artifact
if (udf != null) {
- def.addAttchment(UDFMetaData.class, udf);
+ unit.addAttachment(UDFMetaData.class, udf);
}
log.debug("VDB "+unit.getRoot().getName()+" has been parsed.");