Using standard ODBC (no teiid involved), I can create on each client pc a DSN which does not specify a database (it just has the mysql server address and user/pwd).
Then, from my apps, I can create several connections using that only saved DSN, even if there of course I have to specify a valid db name for the user, on that server.
In this way I can keep a single DSN but reuse it for many different db connections.
I was wondering if, in a similar way, it was possible in Teiid to create a similar "generic" datasource, so that I can then use it in a multisource XML vdb, each time specifying a valid db name for the user, on that server.
Why? If this can work, I can have one single DS for many databases on that server, and just the vdb will know which database it will use on that DS, greatly simplifying the management (I have many databases on that server).
It would work exactly like I am doing on my ODBC app, but through the teiid magic.
I tried and, while I can create the DS like
<datasource jta="false" jndi-name="java:/mysqlserver" pool-name="mysqlserver" enabled="true" use-ccm="false">
and enable it. And I can connect both from the web consele, and from Squirrel .
But if I use it in the vdb with just the jndi name, like
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vdb name="MyVDB" version="1">
<description>Mysql server VDB</description>
<property name="UseConnectorMetadata" value="true" />
<property name="importer.useFullSchemaName" value="false"/>
<source name="mysql5-connector" translator-name="mysql5" connection-jndi-name="java:/mysqlserver"/>
it does not work, the vdb fails loading (as I expected...). I also tried using (guessing) a connection-jndi-name syntax like" java:/mysqlserver/mydb", which does not work either.
Is there a syntax that allows to use such DS in the VDB specifying the database each time?
If not, would it be possible/worth to implement such behaviour?