Did you mean your JDBC connection to Teiid instance is terminated. If that is the case take look at "autoFailover=true" flag on the JDBC URL for automatic connection. See Driver Connection · Teiid Documentation
No i meant that the connection from teiid intance to the datamodel is terminated/closed. and it stays closed even if the physical model/datasource is started again.
If you can provide small test case we can see what is going on? In embedded scenarios the developer is writing the code to create connections to sources.
for example i have an embedded Teiid server running
the teiid server has a VDB deployed, the VDB has a physical model that is an oracle DB.
The oracle DB is running and the server is connected to it.
After sometime i stop the oracle DB but i keep the server running. I can connect to the server using squirrel but when i run a query i get an exception (because the DB is stopped).
When i start the DB again and i try to run a query on teiid using squirrel i still get the exception although the oracle DB is started again. I want Teiid to reconnect automatically to the DB when it is restart again. I do not want to restart the teiid server when the DB is started again.
Is there a way to do that for the embedded Teiid server ??
As mentioned above, in the embedded, yo as the developer is providing the "Connection Factory" class to create the connection to Oracle. So, in effect Connection Factory is pool, so you need to make sure that you always return the valid connection to Teiid.
If you use Teiid Server (not embedded) it uses a connection pool, and you can set configuration parameters to make sure connection is valid before giving to Teiid, you need to mimic the same behavior in your code.