Designer does not provide any API to call into VDB to query for the data directly. Teiid "embedded" runtime does. Designer uses Teiid "embedded" in its plug-ins to support the preview and SQL-Explorer functionality. So, take look at Teiid "embedded".
By default all the connectors are loaded into a separate class loader to avoid the conflicts between jars that are already available in the runtime environment. There are couple ways you can handle this issue (only in embedded, not designer)
1) You can copy the JDBC Driver's Jar file in the "lib" directory of the "embedded" then you do not need to set classpath, as the required jars are loaded into boot classpath. (conflicts may occur, so be cautious)
2) The "embedded" provides, Admin API. This is management API with which you can control add/update/delete of the connectors at runtime. So, you can programatically call to set classpath. Look at javadoc on com.metamatrix.jdbc.api.Connection and follow the getAdmin call.
thanks for you quick reply, now I understand!
I had a look on the plugins:
and I found all the information I need.
Now, I will try to use the org.teiid.designer.dqp to have a runtime environment for "embedded" and will create an other plugins similar to org.teiid.designer.dqp.ui in order to manager the admin part (deploying VDB, executing requests, ...). All this information can be found in the classes QueryClient, VdbExecutor, ....
That's sound good for the integration of the both product (tell me if I missed something).
FI, dqp means Designer Query Plugin ?
DQP = Distributed Query Processor
You are in right with assumption about org.teiid.designer.dqp plugin. This fronts another plugin called org.teiid.embedded where the actual "embedded" runtime is in, which is what you want to use, not dqp directly. The way we have these defined it may be not ideal or may be changing in future releases as we used some of non-public api to support the legacy functionality.
"embedded" runtime + plug-in = org.teiid.embedded
I would suggest you starting fresh with copy "embedded" runtime, wrap it in a plug-in and write your client on top of it. We strive to keep the backwards compatibility with public apis like JDBC and Admin API. This option will increase your download size another 20MB, but your code will be completely independent to that of Teiid, as you only depend on JDBC API.
If you choose to use org.teiid.embedded, the manifest.mf defines the class loading some what different from what Teiid prescribes in the "File path" profile at http://www.jboss.org/community/wiki/TeiidEmbeddedDeploymentProfiles, ideally you would want to avoid what is defined in plug-in.
Teiid team also in discussions to replace SQLExplorer with Eclipse Data Tools in future, does your project make use of this? If it is or has flexibility in choosing it, you can think of contributing this to Teiid. (of course we need to know more about DataRepository and DataSet)
Hope that helps.
ps: "embedded" runtime is separate download apart from the "Teiid Designer" on the Teiid site.