private static String getAppNameFromDeployCmdParams(DeploymentContext dc) { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); return commandParams.name(); }
private static String getAppNameFromDeployCmdParams(DeploymentContext dc) { final DeployCommandParameters commandParams = dc.getCommandParameters(DeployCommandParameters.class); return commandParams.name(); }
public static String getModuleClassPath (Habitat habitat, DeploymentContext context) { DeployCommandParameters params = context.getCommandParameters(DeployCommandParameters.class); return getModuleClassPath(habitat, params.name(), params.libraries()); }
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; }
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; }
/** * 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; } }
wbd.setName(params.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); } } }
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); String name = params.name(); String archiveType = dc.getArchiveHandler().getArchiveType(); Archivist archivist = archivistFactory.getArchivist(archiveType, cl);
final String appName = deployParams.name();
final String appName = commandParams.name(); if (commandParams.origin == OpsParams.Origin.deploy && appRegistry.get(appName) != null) {
final String appName = commandParams.name(); if (commandParams.origin == OpsParams.Origin.deploy && appRegistry.get(appName) != null) {