protected DeployCommandParameters getDeployParams() throws Exception { assert(archive != null); DeployCommandParameters parameters = new DeployCommandParameters(); parameters.name = archive.getName(); parameters.enabled = Boolean.TRUE; parameters.origin = DeployCommandParameters.Origin.deploy; parameters.force = false; parameters.target = getInstanceName(); return parameters; }
private static String getAppNameFromDeployCmdParams(DeploymentContext dc) { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); return commandParams.name(); }
protected DeployCommandParameters getDeployParams() throws Exception { assert(archive != null); DeployCommandParameters parameters = new DeployCommandParameters(); parameters.name = archive.getName(); parameters.enabled = Boolean.TRUE; parameters.origin = DeployCommandParameters.Origin.deploy; parameters.force = false; parameters.target = getInstanceName(); return parameters; }
private static String getAppNameFromDeployCmdParams(DeploymentContext dc) { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); return commandParams.name(); }
DeployCommandParameters deploymentParams = new DeployCommandParameters(new File(uri)); deploymentParams.name = app.getName(); deploymentParams.description = app.getDescription();
private boolean loadOnCurrentInstance(DeploymentContext context) { final DeployCommandParameters commandParams = context.getCommandParameters(DeployCommandParameters.class); final Properties appProps = context.getAppProps(); if (commandParams.enabled) { // if the current instance match with the target if (domain.isCurrentInstanceMatchingTarget(commandParams.target, commandParams.name(), server.getName(), context.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class))) { return true; } if (server.isDas()) { String objectType = appProps.getProperty(ServerTags.OBJECT_TYPE); if (objectType != null) { // if it's a system application needs to be loaded on DAS if (objectType.equals(DeploymentProperties.SYSTEM_ADMIN) || objectType.equals(DeploymentProperties.SYSTEM_ALL)) { return true; } } } } return false; }
DeployCommandParameters deploymentParams = new DeployCommandParameters(new File(uri)); deploymentParams.name = app.getName(); deploymentParams.description = app.getDescription();
private boolean loadOnCurrentInstance(DeploymentContext context) { final DeployCommandParameters commandParams = context.getCommandParameters(DeployCommandParameters.class); final Properties appProps = context.getAppProps(); if (commandParams.enabled) { // if the current instance match with the target if (domain.isCurrentInstanceMatchingTarget(commandParams.target, commandParams.name(), server.getName(), context.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class))) { return true; } if (server.isDas()) { String objectType = appProps.getProperty(ServerTags.OBJECT_TYPE); if (objectType != null) { // if it's a system application needs to be loaded on DAS if (objectType.equals(DeploymentProperties.SYSTEM_ADMIN) || objectType.equals(DeploymentProperties.SYSTEM_ALL)) { return true; } } } } return false; }
DeployCommandParameters commandParams = new DeployCommandParameters(); commandParams.name = name; commandParams.enabled = enabled;
/** * Copy from ApplicationLifeCycle.java */ private boolean loadOnCurrentInstance() { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); final Properties appProps = dc.getAppProps(); if (commandParams.enabled) { // if the current instance match with the target if (domain.isCurrentInstanceMatchingTarget(commandParams.target, commandParams.name(), server.getName(), dc.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class))) { return true; } if (server.isDas()) { String objectType = appProps.getProperty(ServerTags.OBJECT_TYPE); if (objectType != null) { // if it's a system application needs to be loaded on DAS if (objectType.equals(DeploymentProperties.SYSTEM_ADMIN) || objectType.equals(DeploymentProperties.SYSTEM_ALL)) { return true; } } } } return false; } }
} else { ActionReport report = habitat.getComponent(ActionReport.class, "plain"); DeployCommandParameters params = new DeployCommandParameters(app); String appName = EjbContainerUtil.TIMER_SERVICE_APP_NAME; params.name = appName;
wbd.setName(params.name());
"required WAR file (" + TIMER_SERVICE_APP_NAME + ".war) is not installed"); } else { DeployCommandParameters params = new DeployCommandParameters(app); params.name = TIMER_SERVICE_APP_NAME;
private void cleanupPreservedResources(DeploymentContext dc, Event event) { if (Deployment.DEPLOYMENT_FAILURE.equals(event.type())) { final DeployCommandParameters deployCommandParameters = dc.getCommandParameters(DeployCommandParameters.class); if (deployCommandParameters.origin == OpsParams.Origin.deploy || deployCommandParameters.origin == OpsParams.Origin.deploy_instance || deployCommandParameters.origin == OpsParams.Origin.create_application_ref) { Properties properties = deployCommandParameters.properties; String appName = deployCommandParameters.name(); cleanupPreservedResources(appName, properties); } } else if (Deployment.UNDEPLOYMENT_FAILURE.equals(event.type())) { final UndeployCommandParameters undeployCommandParameters = dc.getCommandParameters(UndeployCommandParameters.class); if (undeployCommandParameters.origin == OpsParams.Origin.undeploy) { Properties properties = undeployCommandParameters.properties; String appName = undeployCommandParameters.name(); cleanupPreservedResources(appName, properties); } } }
params = new DeployCommandParameters();
private void cleanupPreservedResources(DeploymentContext dc, Event event) { if (Deployment.DEPLOYMENT_FAILURE.equals(event.type())) { final DeployCommandParameters deployCommandParameters = dc.getCommandParameters(DeployCommandParameters.class); if (deployCommandParameters.origin == OpsParams.Origin.deploy || deployCommandParameters.origin == OpsParams.Origin.deploy_instance || deployCommandParameters.origin == OpsParams.Origin.create_application_ref) { Properties properties = deployCommandParameters.properties; String appName = deployCommandParameters.name(); cleanupPreservedResources(appName, properties); } } else if (Deployment.UNDEPLOYMENT_FAILURE.equals(event.type())) { final UndeployCommandParameters undeployCommandParameters = dc.getCommandParameters(UndeployCommandParameters.class); if (undeployCommandParameters.origin == OpsParams.Origin.undeploy) { Properties properties = undeployCommandParameters.properties; String appName = undeployCommandParameters.name(); cleanupPreservedResources(appName, properties); } } }
DeployCommandParameters parameters = new DeployCommandParameters(new File(archive.getURI())); ActionReport report = new HTMLActionReporter(); context = new DeploymentContextImpl(report, archive, parameters, env);