Author: rareddy
Date: 2010-08-04 15:30:28 -0400 (Wed, 04 Aug 2010)
New Revision: 2415
Modified:
trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
Log:
TEIID-1006: Once after the metadata is loaded asynchronously the transformation metadata
needs to be computed.
Modified: trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2010-08-04 14:37:01
UTC (rev 2414)
+++ trunk/runtime/src/main/java/org/teiid/deployers/CompositeVDB.java 2010-08-04 19:30:28
UTC (rev 2415)
@@ -76,7 +76,7 @@
this.mergedVDB = null;
}
- private void update(VDBMetaData vdbMetadata) {
+ void update(VDBMetaData vdbMetadata) {
TransformationMetadata metadata = buildTransformationMetaData(vdbMetadata,
getVisibilityMap(), getMetadataStores(), getUDF());
vdbMetadata.addAttchment(QueryMetadataInterface.class, metadata);
vdbMetadata.addAttchment(TransformationMetadata.class, metadata);
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-08-04 14:37:01
UTC (rev 2414)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBDeployer.java 2010-08-04 19:30:28
UTC (rev 2415)
@@ -370,6 +370,7 @@
}
else {
if (vdb.isValid()) {
+ this.vdbRepository.updateVDB(vdb.getName(), vdb.getVersion());
vdb.setStatus(VDB.Status.ACTIVE);
LogManager.logInfo(LogConstants.CTX_RUNTIME,
RuntimePlugin.Util.getString("vdb_activated",vdb.getName(), vdb.getVersion()));
//$NON-NLS-1$
}
Modified: trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-08-04 14:37:01
UTC (rev 2414)
+++ trunk/runtime/src/main/java/org/teiid/deployers/VDBRepository.java 2010-08-04 19:30:28
UTC (rev 2415)
@@ -223,4 +223,11 @@
this.odbcStore = getODBCMetadataStore();
}
}
+
+ public void updateVDB(String name, int version) {
+ CompositeVDB v = this.vdbRepo.get(new VDBKey(name, version));
+ if (v!= null) {
+ v.update(v.getVDB());
+ }
+ }
}
Show replies by date