Teiid 7.7 such a old version, I had to download and documents and dig through
The URL will be in the form "mm://localhost:34413"
I am not sure if the above code is correct but you can see this for getting the connection teiid/AdminFactory.java at 7.7.x · rareddy/teiid · GitHub
Port 9999, came into existence with Teiid 8.0, so I am sure mixing the code a bit, and management API in 7.x line was completely different from 8.x. But above link should give you starting point.
I was able to connect. But I am facing some different problem.
I have only one data source currently. i.e MYSQL . I created VDB layer of that.
When I directly queried on MYSQL DB , I am able to fetch primary key as expected using ResultSet rs = metadata.getPrimaryKeys(null, null, "employee");
But while performing same thing on VirtualDB , I am getting null value for that.
ResultSet rs = metadata.getPrimaryKeys("aakash_test", "user@teiid-security", "employee"); with parameter and
for without parameters ResultSet rs = metadata.getPrimaryKeys(null, null, "employee"); without parameters
on teiid-7.7.0.Final-client and jboss-5.1.0.GA.
I know some jdbc methods are not supported for teiid. But I dont see metadata.getPrimaryKeys() methods in that list.
Thanks in advance .
It depends on how you imported your mysql model, and that has the PK information specified on it. Then it will work. Take look at the System tables and see if the information is present.