public void validateUndeploymentTarget(String target, String name) { List<String> referencedTargets = domain.getAllReferencedTargetsForApplication(name); if (referencedTargets.size() > 1) { Application app = applications.getApplication(name); if (!DeploymentUtils.isDomainTarget(target)) { if (app.isLifecycleModule()) { throw new IllegalArgumentException(localStrings.getLocalString("delete_lifecycle_on_multiple_targets", "Lifecycle module {0} is referenced by more than one targets. Please remove other references before attempting delete operation.", name)); } else { throw new IllegalArgumentException(localStrings.getLocalString("undeploy_on_multiple_targets", "Application {0} is referenced by more than one targets. Please remove other references or specify all targets (or domain target if using asadmin command line) before attempting undeploy operation.", name)); } } } }
public void validateUndeploymentTarget(String target, String name) { List<String> referencedTargets = domain.getAllReferencedTargetsForApplication(name); if (referencedTargets.size() > 1) { Application app = applications.getApplication(name); if (!DeploymentUtils.isDomainTarget(target)) { if (app.isLifecycleModule()) { throw new IllegalArgumentException(localStrings.getLocalString("delete_lifecycle_on_multiple_targets", "Lifecycle module {0} is referenced by more than one targets. Please remove other references before attempting delete operation.", name)); } else { throw new IllegalArgumentException(localStrings.getLocalString("undeploy_on_multiple_targets", "Application {0} is referenced by more than one targets. Please remove other references or specify all targets (or domain target if using asadmin command line) before attempting undeploy operation.", name)); } } } }
private void handleOtherAppConfigChanges(Object parent, String appName) { Application application = applications.getApplication(appName); if (application.isLifecycleModule()) { return; } // reload the application for other application related // config changes if the application is in enabled state if (isCurrentInstanceMatchingTarget(parent) && deployment.isAppEnabled(application)) { disableApplication(appName); enableApplication(appName); } }
private void handleAppEnableChange(Object parent, String appName, boolean enabled) { Application application = applications.getApplication(appName); if (application.isLifecycleModule()) { return; } if (enabled) { if (isCurrentInstanceMatchingTarget(parent)) { enableApplication(appName); } } else { if (isCurrentInstanceMatchingTarget(parent)) { disableApplication(appName); } } }
if (!app.isLifecycleModule()) { if (type==null || isApplicationOfThisType(app, type)) { String[] currentRow;
if (app.isLifecycleModule()){ throw new IllegalArgumentException(localStrings.getLocalString("lifecyclemodule_withsamename_exists", "Lifecycle module with same name {0} already exists, please pick a different name for the application. ", name));
if (application.isLifecycleModule()) { if (!terse) { part.setMessage(localStrings.getLocalString("listsubcomponents.no.elements.to.list", "Nothing to List."));
public void execute(AdminCommandContext context) { ActionReport report = context.getActionReport(); ActionReport.MessagePart part = report.getTopMessagePart(); boolean found = false; for (Application app : domain.getApplicationsInTarget(target)) { if (app.isLifecycleModule()) { ActionReport.MessagePart childPart = part.addChild(); childPart.setMessage(app.getName()); found = true; } } if (!found && !terse) { part.setMessage(localStrings.getLocalString("list.components.no.elements.to.list", "Nothing to List.")); } report.setActionExitCode(ActionReport.ExitCode.SUCCESS); } }
if (app.isLifecycleModule()) { handleLifecycleModule(context, t); return;
if (application.isLifecycleModule()) { try { deployment.unregisterAppFromDomainXML(appName, target, true);