use of org.guvnor.ala.exceptions.RuntimeOperationException in project kie-wb-common by kiegroup.
the class DockerRuntimeManager method start.
@Override
public void start(RuntimeId runtimeId) throws RuntimeOperationException {
DockerRuntime runtime = (DockerRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
try {
LOG.info("Starting container: " + runtimeId.getId());
docker.getDockerClient(runtime.getProviderId()).startContainer(runtime.getId());
refresh(runtimeId);
} catch (DockerException | InterruptedException ex) {
LOG.error("Error Starting container: " + runtimeId.getId(), ex);
throw new RuntimeOperationException("Error Starting container: " + runtimeId.getId(), ex);
}
}
use of org.guvnor.ala.exceptions.RuntimeOperationException in project kie-wb-common by kiegroup.
the class DockerRuntimeManager method restart.
@Override
public void restart(RuntimeId runtimeId) throws RuntimeOperationException {
DockerRuntime runtime = (DockerRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
try {
docker.getDockerClient(runtime.getProviderId()).restartContainer(runtime.getId());
refresh(runtimeId);
} catch (DockerException | InterruptedException ex) {
LOG.error("Error Restarting container: " + runtimeId.getId(), ex);
throw new RuntimeOperationException("Error Restarting container: " + runtimeId.getId(), ex);
}
}
use of org.guvnor.ala.exceptions.RuntimeOperationException in project kie-wb-common by kiegroup.
the class WildflyRuntimeManager method start.
@Override
public void start(RuntimeId runtimeId) throws RuntimeOperationException {
WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
int result = wildfly.getWildflyClient(runtime.getProviderId()).start(runtime.getId());
if (result != 200) {
throw new RuntimeOperationException("Error Starting container: " + runtimeId.getId() + " \n\t There as a problem with starting your application, please check into the Wildfly Logs for more information.");
}
refresh(runtimeId);
}
use of org.guvnor.ala.exceptions.RuntimeOperationException in project kie-wb-common by kiegroup.
the class WildflyRuntimeManager method stop.
@Override
public void stop(RuntimeId runtimeId) throws RuntimeOperationException {
WildflyRuntime runtime = (WildflyRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
try {
wildfly.getWildflyClient(runtime.getProviderId()).stop(runtime.getId());
refresh(runtimeId);
} catch (WildflyClientException ex) {
throw new RuntimeOperationException("Error Stopping container: " + runtimeId.getId() + "\n\t There as a problem with stopping your application, please check into the Wildfly Logs for more information.", ex);
}
}
use of org.guvnor.ala.exceptions.RuntimeOperationException in project kie-wb-common by kiegroup.
the class OpenShiftRuntimeManager method restart.
@Override
public void restart(RuntimeId runtimeId) throws RuntimeOperationException {
OpenShiftRuntime runtime = (OpenShiftRuntime) runtimeRegistry.getRuntimeById(runtimeId.getId());
try {
LOG.info("Restarting runtime: " + runtimeId.getId());
openshift.getOpenShiftClient(runtime.getProviderId()).restart(runtime.getId());
refresh(runtimeId);
LOG.info("Restarted runtime: " + runtimeId.getId());
} catch (OpenShiftClientException ex) {
LOG.error("Error Restarting runtime: " + runtimeId.getId(), ex);
throw new RuntimeOperationException("Error Restarting runtime: " + runtimeId.getId(), ex);
}
}
Aggregations