private void stopApplication(Application app, ApplicationInfo appInfo) { final ActionReport dummy = new HTMLActionReporter(); if (appInfo!=null) { UndeployCommandParameters parameters = new UndeployCommandParameters(appInfo.getName()); parameters.origin = UndeployCommandParameters.Origin.unload; parameters.command = UndeployCommandParameters.Command.shutdown_server; try { deployment.disable(parameters, app, appInfo, dummy, logger); } catch (Exception e) { logger.log(Level.SEVERE, KernelLoggerInfo.loadingApplicationErrorDisable, e); } unloadApplicationForTenants(app, dummy); appRegistry.remove(appInfo.getName()); } }
appRegistry.remove(appName);
appRegistry.remove(appName);
subReport.setFailureCause(e); appRegistry.remove(appInfo.getName());
public void undeploy(String appName, ExtendedDeploymentContext context) { ActionReport report = context.getActionReport(); UndeployCommandParameters params = context.getCommandParameters(UndeployCommandParameters.class); ApplicationInfo info = appRegistry.get(appName); if (info==null) { report.failure(context.getLogger(), "Application " + appName + " not registered", null); events.send(new Event(Deployment.UNDEPLOYMENT_FAILURE, context)); return; } events.send(new Event(Deployment.UNDEPLOYMENT_START, info)); // for DAS target, the undeploy should unload the application // as well if (DeploymentUtils.isDASTarget(params.target)) { unload(info, context); } if (report.getActionExitCode().equals(ActionReport.ExitCode.SUCCESS)) { events.send(new Event(Deployment.UNDEPLOYMENT_SUCCESS, context)); deploymentLifecycleProbeProvider.applicationUndeployedEvent(appName, getApplicationType(info)); } else { events.send(new Event(Deployment.UNDEPLOYMENT_FAILURE, context)); } appRegistry.remove(appName); }
public void undeploy(String appName, ExtendedDeploymentContext context) { ActionReport report = context.getActionReport(); UndeployCommandParameters params = context.getCommandParameters(UndeployCommandParameters.class); ApplicationInfo info = appRegistry.get(appName); if (info==null) { report.failure(context.getLogger(), "Application " + appName + " not registered", null); events.send(new Event(Deployment.UNDEPLOYMENT_FAILURE, context)); return; } events.send(new Event(Deployment.UNDEPLOYMENT_START, info)); // for DAS target, the undeploy should unload the application // as well if (DeploymentUtils.isDASTarget(params.target)) { unload(info, context); } if (report.getActionExitCode().equals(ActionReport.ExitCode.SUCCESS)) { events.send(new Event(Deployment.UNDEPLOYMENT_SUCCESS, context)); deploymentLifecycleProbeProvider.applicationUndeployedEvent(appName, getApplicationType(info)); } else { events.send(new Event(Deployment.UNDEPLOYMENT_FAILURE, context)); } appRegistry.remove(appName); }
appRegistry.remove(appName); appInfo.setIsJavaEEApp(sortedEngineInfos); appRegistry.add(appName, appInfo);
appRegistry.remove(appName); appInfo.setIsJavaEEApp(sortedEngineInfos); appRegistry.add(appName, appInfo);