use of org.teiid.adminapi.VDB.ConnectionType in project teiid by teiid.
the class TestEmbeddedServerAdmin method testChangeVDBConnectionType.
@Test
public void testChangeVDBConnectionType() throws AdminException {
ConnectionType previous = admin.getVDB("AdminAPITestVDB", 1).getConnectionType();
admin.changeVDBConnectionType("AdminAPITestVDB", 1, ConnectionType.ANY);
assertEquals(ConnectionType.ANY, admin.getVDB("AdminAPITestVDB", 1).getConnectionType());
admin.changeVDBConnectionType("AdminAPITestVDB", 1, previous);
}
use of org.teiid.adminapi.VDB.ConnectionType in project teiid by teiid.
the class RuntimeVDB method changeConnectionType.
public void changeConnectionType(ConnectionType type) throws AdminProcessingException {
synchronized (this.vdb) {
ConnectionType previous = this.vdb.getConnectionType();
this.vdb.setConnectionType(type);
try {
this.listener.connectionTypeChanged();
} catch (AdminProcessingException e) {
this.vdb.setConnectionType(previous);
throw e;
}
}
}
Aggregations