[
https://issues.jboss.org/browse/TEIID-1609?page=com.atlassian.jira.plugin...
]
Ramesh Reddy commented on TEIID-1609:
-------------------------------------
you can call "admin.getVDB(name)", then check if returned anything or check the
status to make sure it is active before making the connection.
Delay required when get connection to admin deployed VDB
--------------------------------------------------------
Key: TEIID-1609
URL:
https://issues.jboss.org/browse/TEIID-1609
Project: Teiid
Issue Type: Bug
Affects Versions: 7.4
Environment: Windows 7, JBoss 5.1.0
Reporter: Andriy Rokhmanov
Assignee: Steven Hawkins
Priority: Minor
Attachments: error.txt
//Steps to reproduce (pseudo-code):
final AdminFactory adminFactory = AdminFactory.getInstance();
final Admin teiidAdmin = adminFactory.createAdmin("####",
"####".toCharArray(),"mms://127.0.0.1:31443"));
teiidAdmin.deployVDB("test-vdb.xml",
ByteStreams.newInputStreamSupplier(vdbString.getBytes()).getInput());
teiidAdmin.close();
// Thread.sleep(500);
final TeiidDataSource teiidDataSource = new TeiidDataSource();
teiidDataSource.setDatabaseName("Test");
teiidDataSource.setUser("****");
teiidDataSource.setPassword("****");
// The next line causes exception:
Connection conn = teiidDataSource.getConnection();
CDT SEVERE [org.teiid.jdbc] (pool-6-thread-1) Could not create connection
org.teiid.jdbc.TeiidSQLException: org.teiid.core.TeiidException
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:109)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:69)
at org.teiid.jdbc.EmbeddedProfile.connect(EmbeddedProfile.java:58)
at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:105)
at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:234)
at org.teiid.jdbc.TeiidDataSource.getConnection(TeiidDataSource.java:215)
...
// Please note that the same code works fine in Teiid 7.3
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira