if (referencedTargets.isEmpty()) { if (isRegistered(name)) { if (!isRedeploy && DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("application.alreadyreg.redeploy", "Application with name {0} is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name.", name)); } else { if (!DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("use.create_app_ref_2", "Application {0} is already deployed in this domain. Please use create application ref to create application reference on target {1}.", name, target)); if (DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("application.deploy_domain", "Application with name {0} is already referenced by other target(s). Please specify force option to redeploy to domain.", name)); return; } else { if (!DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("redeploy_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 redeploy 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)); } } } }
if (referencedTargets.isEmpty()) { if (isRegistered(name)) { if (!isRedeploy && DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("application.alreadyreg.redeploy", "Application with name {0} is already registered. Either specify that redeployment must be forced, or redeploy the application. Or if this is a new deployment, pick a different name.", name)); } else { if (!DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("use.create_app_ref_2", "Application {0} is already deployed in this domain. Please use create application ref to create application reference on target {1}.", name, target)); if (DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("application.deploy_domain", "Application with name {0} is already referenced by other target(s). Please specify force option to redeploy to domain.", name)); return; } else { if (!DeploymentUtils.isDomainTarget(target)) { throw new IllegalArgumentException(localStrings.getLocalString("redeploy_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 redeploy 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 boolean checkEjbBundleForTimers(EjbBundleDescriptor ejbBundle, boolean createTimers, String target) { boolean result = false; if (ejbBundle != null) { if (_logger.isLoggable(Level.FINE)) { _logger.log( Level.FINE, "EjbDeployer.checkEjbBundleForTimers in BUNDLE: " + ejbBundle.getName()); } for (EjbDescriptor ejbDescriptor : ejbBundle.getEjbs()) { if (_logger.isLoggable(Level.FINE)) { _logger.log( Level.FINE, "EjbDeployer.checkEjbBundleForTimers in EJB: " + ejbDescriptor.getName()); } if (ejbDescriptor.isTimedObject()) { result = true; if (createTimers && !DeploymentUtils.isDomainTarget(target)) { createAutomaticPersistentTimersForEJB(ejbDescriptor, target); } } } } return result; }
private boolean isDASTarget(DeploymentContext context, DeployCommandParameters params) { if (DeploymentUtils.isDASTarget(params.target)) { return true; } else if (DeploymentUtils.isDomainTarget(params.target)) { List<String> targets = context.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class); if (targets == null) { targets = domain.getAllReferencedTargetsForApplication( params.name); } if (targets.size() == 1 && DeploymentUtils.isDASTarget(targets.get(0))) { return true; } } return false; } }
private boolean checkEjbBundleForTimers(EjbBundleDescriptorImpl ejbBundle, boolean createTimers, String target) { boolean result = false; if (ejbBundle != null) { if (_logger.isLoggable(Level.FINE)) { _logger.log( Level.FINE, "EjbDeployer.checkEjbBundleForTimers in BUNDLE: " + ejbBundle.getName()); } for (EjbDescriptor ejbDescriptor : ejbBundle.getEjbs()) { if (_logger.isLoggable(Level.FINE)) { _logger.log( Level.FINE, "EjbDeployer.checkEjbBundleForTimers in EJB: " + ejbDescriptor.getName()); } if (ejbDescriptor.isTimedObject()) { result = true; if (createTimers && !DeploymentUtils.isDomainTarget(target)) { createAutomaticPersistentTimersForEJB(ejbDescriptor, target); } } } } return result; }
private String getLongStatus(ApplicationRef ref) { String message = ""; if (DeploymentUtils.isDomainTarget(target)) { // ignore --verbose for target domain return message; } boolean isVersionEnabled = domain.isAppRefEnabledInTarget(ref.getRef(), target); if ( isVersionEnabled ) { message = localStrings.getLocalString("list.applications.verbose.enabled", "enabled"); } else { message = localStrings.getLocalString("list.applications.verbose.disabled", "disabled"); } return message; } }
if (DeploymentUtils.isDomainTarget(target)) {
if (DeploymentUtils.isDomainTarget(deployParams.target)) { if (previousEnabledAttributes != null) { String enabledAttr = previousEnabledAttributes.getProperty(DeploymentUtils.DOMAIN_TARGET_NAME);
if (DeploymentUtils.isDomainTarget(target)) { for (String tgt : previousTargets) { String vs = domain.getVirtualServersForApplication(tgt, name); if (DeploymentUtils.isDomainTarget(target)) {
if (DeploymentUtils.isDomainTarget(deployParams.target)) { if (previousEnabledAttributes != null) { String enabledAttr = previousEnabledAttributes.getProperty(DeploymentUtils.DOMAIN_TARGET_NAME);
if (enabled || DeploymentUtils.isDomainTarget(target)) { Application app = dmn.getApplications().getApplication(appName); ConfigBeanProxy app_w = t.enroll(app); if (!DeploymentUtils.isDomainTarget(target)) { targets.add(target); } else {
if (!DeploymentUtils.isDomainTarget(params.target)) { targets.add(params.target); } else {
if (enabled || DeploymentUtils.isDomainTarget(target)) { Application app = dmn.getApplications().getApplication(appName); ConfigBeanProxy app_w = t.enroll(app); if (!DeploymentUtils.isDomainTarget(target)) { targets.add(target); } else {
if (t!=null) { List<String> targets = new ArrayList<String>(); if (!DeploymentUtils.isDomainTarget(tgt)) { targets.add(tgt); } else {
if (createTimers && dcp.isredeploy != null && dcp.isredeploy && DeploymentUtils.isDomainTarget(target)) { List<String> targets = (List<String>)context.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class); for (String ref: targets) {
if (createTimers && dcp.isredeploy != null && dcp.isredeploy && DeploymentUtils.isDomainTarget(target)) { List<String> targets = (List<String>)context.getTransientAppMetaData(DeploymentProperties.PREVIOUS_TARGETS, List.class); for (String ref: targets) {
String status = "disabled"; if (!DeploymentUtils.isDomainTarget(target)) { ApplicationRef ref = domain.getApplicationRefInTarget(appName, target); if (ref == null) {
if (!DeploymentUtils.isDomainTarget(target)) { ApplicationRef ref = domain.getApplicationRefInTarget(name, target); if (ref == null) { if (env.isDas() && DeploymentUtils.isDomainTarget(target)) { List<String> targets = domain.getAllReferencedTargetsForApplication(name);