use of org.teiid.adminapi.AdminException in project teiid by teiid.
the class IntegrationTestRestWebserviceGeneration method deployVDB.
private void deployVDB() throws AdminException, FileNotFoundException {
// we'll remove the war from the previous test as we are now lazily removing it on the server side
try {
admin.undeploy("sample_1.war");
} catch (AdminException e) {
}
admin.deploy("sample-vdb.xml", new FileInputStream(UnitTestUtil.getTestDataFile("sample-vdb.xml")));
assertTrue(AdminUtil.waitForVDBLoad(admin, "sample", 1, 3));
}
use of org.teiid.adminapi.AdminException in project teiid by teiid.
the class ResteasyEnabler method finishedDeployment.
@Override
public void finishedDeployment(String name, CompositeVDB cvdb) {
final VDBMetaData vdb = cvdb.getVDB();
if (!vdb.getStatus().equals(Status.ACTIVE)) {
return;
}
final String warName = buildName(name, cvdb.getVDB().getVersion());
if (generator.hasRestMetadata(vdb)) {
final Runnable job = new Runnable() {
@Override
public void run() {
try {
byte[] warContents = generator.getContent(vdb);
if (!vdb.getStatus().equals(Status.ACTIVE)) {
return;
}
if (warContents != null) {
// make it a non-persistent deployment
getAdmin().deploy(warName, new ByteArrayInputStream(warContents), false);
}
} catch (IOException e) {
LogManager.logWarning(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50109, warName));
} catch (AdminException e) {
LogManager.logWarning(LogConstants.CTX_RUNTIME, e, IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50109, warName));
}
}
};
getExecutor().execute(job);
}
}
Aggregations