Show Table of Contents
11.2. Runtime Metadata Updates
Runtime updates via system procedures and DDL statements are by default ephemeral. They are effective across the cluster only for the currently running VDBs. With the next VDB start the values will revert to whatever is stored in the VDB. Updates may be made persistent by configuring an
org.teiid.metadata.MetadataRepository.
An instance of a
MetadataRepository can be installed via the VDB file.
In Designer based VDB, you can edit the vdb.xml file in the META-INF directory or use Dynamic VDB file as below.
<vdb name="{vdb-name}" version="1">
<model name="{model-name}" type="VIRTUAL">
<metadata type="{jboss-as-module-name}"></metadata>
</model>
</vdb>
In the above code fragment, replace the {jboss-as-module-name} with a JBoss EAP module name that has library that implements the
org.teiid.metadata.MetadataRepository interface and defines file "META-INF/services/org.teiid.metadata.MetadataRepository" with name of the implementation file.
The
MetadataRepository repository instance may fully implement as many of the methods as needed and return null from any unneeded getter.
Note
It is not recommended to directly manipulate
org.teiid.metadata.AbstractMetadataRecord instances. System procedures and DDL statements should be used instead since the effects will be distributed through the cluster and will not introduce inconsistencies.
org.teiid.metadata.AbstractMetadataRecord objects passed to the MetadataRepository have not yet been modified. If the MetadataRepository cannot persist the update, then a RuntimeException should be thrown to prevent the update from being applied by the runtime engine.
Note
The MetadataRepository can be accessed by multiple threads both during load (if using dynamic VDBs) or at runtime with DDL statements. Your implementation should handle any needed synchronization.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.