Teiid "Local Connection".
jamit Jan 14, 2013 1:24 PMHi,
1) My project has teiid and the our application which uses teiid on the same Jboss EAP.
The current implementation has socket based connection, which is created very often to connect to different data models and fetch data as per the http request.
I would like to know if "Local Connections" would be a benefit in this scenario ? If Yes what would be the benefits...performance,scalability etc?
2) Further looking into Local connection revelas that we can use "useCallingThread=true" to have the calling thread being maintained and avoid use of worker threads.
But didnot find a sample code for this.it would be great if a sample is provided for the same.
3) Tricky part: We have about 20 Vdbs which are used as multi-source=true and connecting to 3/4 physical databases.
Since user can fetch data from any of these databases I m unable to create a Teiid-Datasource for them.
Confusion is :: Should there be one teiid data source catering to all the other datasources or should there be one Teiid DS per Vdb in the ds.xml?
In both the cases how should I provide the database name, jndi-name while creating the Local connection.
I m referring to the following part described in the teiid documentation:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
<datasources>
<xa-datasource>
<jndi-name>TEIID-DS</jndi-name>
<xa-datasource-class>org.teiid.jdbc.TeiidDataSource</xa-datasource-class>
<xa-datasource-property name="DatabaseName">myVDB</xa-datasource-property>
<xa-datasource-property name="user">admin</xa-datasource-property>
<xa-datasource-property name="password">password</xa-datasource-property>
<!-- pool and other JBoss datasource properties -->
<max-pool-size>10</max-pool-size>
</xa-datasource>
</datasources>
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks
Amit