I found this piece of code to accept remote JDBC connection requests:
EmbeddedServer es =
SocketConfiguration s =
EmbeddedConfiguration config =
Does this transport feature work with Teiid JDBC client driver?
Yes, you are on right path. You can open both JDBC and ODBC transports with socket configuration if you need *remote* access. Here is example of it teiid-embedded-examples/embedded-portfolio-sockets at master · teiid/teiid-embedded-examples · GitHub
Once ou have configured, you can use JDBC client, just like you do for the server.
I got my server to work with Teiid JDBC client driver. However, is it possible to pass in extra property in JDBC url? If so, which function I will need to overwrite in EmbeddedServer to retrieve this extra property value which get passed it from client? And how is the syntax for JDBC url?
I have URL like the following:
And I want to use the value of param1 to generate the correct VDB name in server side. Because of our client app doesn't know VDB name.
You can send custom payload through "SET PAYLOAD ..." see SET Statement · Teiid Documentation
However, that can never be used to rename a VDB. Once the parameter is set, these can be accessed in custom translator. Instead explain your usecase there may be a different solution.
Let me explain our usecase.
We have code in the server side to build VDB schema on the fly and pass it to Teiid Embedded server. And we want to combine this with Teiid client JDBC driver.
1. User will use Teiid client JDBC driver to access VDB
2. Server side: If VDB doesn't exist in Teiid Embedded server, our server will generate new VDB and store it to Teiid Embedded Server. Before passing to Teiid engine.
3. Return existing or new VDB jdbc connection back to client through the driver
Therefore, we are looking for a place to build a wrapper on top of Teiid Embedded server which before passing VDB name into Teiid engine. Therefore, our engine can check whether we need to build VDB on the fly first.
What you wanting to do is currently not possible, however we have been working towards solution like that in - JBoss Issue Tracker Using this, you can issue DDL statements through the JDBC client and build the VDB. However, there are few loose ends we are still trying to figure out. The implementation so far is at branch GitHub - teiid/teiid at TEIID-2578 we hope get initial commit done on 9.2 development cycle, so if you want to participate and provide feed back that would be great. You can build Teiid from above branch and test it out.
I see. I will love to participate and provide feedback. Would you mind to tell me the name of the listener class which listens and processes JDBC URL inside Teiid Embedded server?
There is no listener class. You need to supply vdbEdit=true URL property to create a VDB. The server mode example here teiid/IntegrationTestDDL.java at TEIID-2578 · teiid/teiid · GitHub
Similar without data sources will work for embedded. There is documentation forth coming.