1) Yes, using the deployVDBZip, you can load a Designer based VDB. Teiid engine loads the .INDEX files, not the XMI files. XMI files are there for as source representation of the XMI files. Yes, it loads all the models, not the data sources backing those models. You have to provide the data sources by using "addConnectionFactory" method, based on what data source names you configured your VDB with.
2) Yes, you can persist the VDBRespository in your environment. The question is does Teiid provide any framework in "embedded" mode to do this? No, Teiid does not, nor have any intentions. This is a embedded server, and Teiid does not put any restrictions on where this can be embedded and it may or may not have a file system available etc. Any such code needs to be developed by the integrator. The typical example of people using the embedded, only deploy a specialized versions of the VDB(s) and should know how to utilize them. However, if you trying to develop a general purpose server, then these are some of the tasks you would need to develop. The other choice is to use a fully functional Teiid server using JBoss AS.
We currently do not ship embedded with the ability to read .INDEX files. The index metadata JAR is not in the kit. Now that we have added zip based deployment we could allow this and it would require only a couple of modifications.
Yes i debugged the deployVDBZip method and found that it created all the resources like resource for vdb.xml , *.xmi as well as for *.index but when these resource got passed to the loadmetadata method of meta data repository, they were not used . Instead of using then it again made a call to the loadmetadata method of the execution factory to load the meta data where as i was thinking that in this case meta data will be built from the *.xmi or from index files.
what i was assuming is that out of the three methods provided for deploying vdb
deployVDB(String name, ModelMetaData... models)
This method will build the models from the model list and meta data will be loaded by making a connection to the underneath data source , fetching the meta data at the time of deployment and then loading it in metadata factory associated with metadata repository of the model . Works as expected
This method will read the vdb.xml and load the model as well as meta data as mentioned in the above method . Works as expected
in this method i was assuming that , there will be no connection made to underneath data source in order to fetch the meta data and then meta data will be built fromthe resources packed in vdb files . Do not works as expected .
Please let me know my understanding is right or not .
> deployVDBZip(URL url)
> in this method i was assuming that , there will be no connection made to underneath data source in order to fetch the meta data and then meta data will be built fromthe resources packed in vdb files . Do not works as expected .
There is no restriction on where the metadata can be - in the vdb.xml, fetched from sources, or in the zip as a ddl file. Can you elaborate on what didn't work?
Hi Steve ,
I created a simple JDBC source model from teiid designer and created a vdb on top of it.
Now i tried to deploy this *.vdb file using deployVDBZip(URL url) of the embedded server.
First i added the same jndi connection factory in the embedded server i.e. the one i used in teiid designer , after that i passed the vdb as a url in deployVDBZip method for e.g. say FILE file = "C\MyVDB.vdb"; embeddedServer.deployVDBZip(file.toURI().toURL()) ;
in this i assumed that meta data will be loaded from the zip file i.e. all the meta data stored in index or zip files , where as it again went to the execution factory to load the meta data by fetching all the schema information from JDBC catalog.
My understanding here is , if it has to fetch the metadata from the the database then why complete mete data information has been stored in *.vdb file. Please let me know whether my understanding is right or not.
> Please let me know whether my understanding is right or not.
No deployVDBZip is not for Designer based vdbs. Ramesh added TEIID-2888 as an enhancement, but the intent was originally not to support desinger vdbs but rather just to allow for better management of DDL and vdb resources. An embedded deployment zip would typically look something like:
/ - zip root
/META-INF/vdb.xml - main definition file
Where the vdb.xml references the schema files using the DDL-FILE metadata type - as shown in Custom Metadata Repository - Teiid 8.7 (draft) - Project Documentation Editor
But there is no restriction on the vdb.xml when used in a zip. It can still contain inline metadata or load from sources. We probably need to expand on this in the embedded guide.