-
1. Re: Dynamic VDB adding a resource jar file
shawkins May 7, 2014 12:13 PM (in response to teiiduser)Yes that is possible using a zip deployment with your vdb.xml.
Create:
foo.vdb
/lib/some.jar
/META-INF/vdb.xml
The deployer will scan the lib and add all jars to the vdb classpath. However this will not work yet in Teiid Embedded as it does not perform the same classpath management.
-
2. Re: Dynamic VDB adding a resource jar file
teiiduser May 7, 2014 12:31 PM (in response to shawkins)Thank you for the reply. What do you mean by Teiid Embedded? Do you mean that it will not work with Dynamic VDB XML ?
I am doing this basically for my UDF jar file.
I tried creating a folder with
/lib/some.jar
/META-INF/myvdb.xml
and then zipped it and renamed as vdb. Copied this to the deployments folder. It does not get deployed.
-
3. Re: Dynamic VDB adding a resource jar file
shawkins May 7, 2014 12:36 PM (in response to teiiduser)> What do you mean by Teiid Embedded?
It's our embeddable server environment. It's clear though that you are using the full AS based server.
> It does not get deployed.
In a zip deployment we expect name vdb.xml. You cannot use myvdb.xml.
-
4. Re: Dynamic VDB adding a resource jar file
rareddy May 7, 2014 12:49 PM (in response to teiiduser)Dynamic VDB you can not define JAR file as is, as defined in here VDB Definition - Teiid 8.8 (draft) - Project Documentation Editor
you can define the following in the your -vdb.xml file
<
property
name
=
"lib"
value
=
"{module-name}"
></
property
>where you need to create a JBoss AS7 module with your JAR file and define the module name in the above property. At the time of the deployment the defined module is made available to the VDB.
If you are using Designer based VDB, then you need to follow what Steve is saying, place the jar archive in "lib" folder of the VDB archive. Then at deployment time the deployer will load these JAR files into VDB's classpath.
If you are using "embedded", you can just place it your VM's classpath, both the above techniques will not work as Teiid unaware of the host environment to access and load. It can possibly done for Designer based VDB as Steve is eluding to, but it is not available yet.
Ramesh..
-
5. Re: Dynamic VDB adding a resource jar file
shawkins May 7, 2014 12:55 PM (in response to rareddy)Ramesh, it doesn't matter whether the vdb comes from designer or not. We'll process the dynamic aspects of the deployment all the same.
-
6. Re: Dynamic VDB adding a resource jar file
teiiduser May 7, 2014 1:59 PM (in response to shawkins)I could deploy using what Steven suggested. Only thing I had to 'Add' it using console. The directory scanner did not pick up the vdb for automatic deployment. Is it how this is supposed to be?
Thank you!
-
7. Re: Dynamic VDB adding a resource jar file
rareddy May 7, 2014 3:09 PM (in response to teiiduser)1 of 1 people found this helpfulif place the file in the "deployments" directory, you can either also place another marker file with "youvebname.vdb.dodeploy" or add the .vdb files to list of deployments that does not need marker files. Checkout the README.txt file there for instructions.
-
8. Re: Dynamic VDB adding a resource jar file
teiiduser May 7, 2014 5:01 PM (in response to rareddy)I came across :
https://docs.jboss.org/author/display/teiid84final/Dynamic+VDBs
How exactly does separating the DDL from XML improve the memory footprint?
Thanks!
-
9. Re: Dynamic VDB adding a resource jar file
shawkins May 7, 2014 6:11 PM (in response to teiiduser)When the DDL is part of the vdb.xml we not only hold the runtime schema objects in memory, but the DDL as well. Albeit that shouldn't be too much of an overhead in most cases.
-
10. Re: Dynamic VDB adding a resource jar file
madhu.garimilla May 15, 2014 8:50 AM (in response to rareddy)Hi Ramesh,
If i have some .txt files inside a jboss module and i try to add that module to VDB using
<
property
name
=
"lib"
value
=
"{module-name}"
></
property
>Then Would i be able to access the contents of the .txt file inside my VDB ?
-
11. Re: Dynamic VDB adding a resource jar file
shawkins May 19, 2014 7:23 PM (in response to madhu.garimilla)Continued on how to access a resource(.txt) file , present in a jboss module, from a vdb.xml?
Sorry, we didn't mean to leave this unanswered.