1 23 24 32 33 package com.sun.enterprise.deployment.phasing; 34 35 import com.sun.enterprise.config.ConfigContext; 36 import com.sun.enterprise.deployment.backend.IASDeploymentException; 37 38 import com.sun.enterprise.admin.target.TargetBuilder; 39 import com.sun.enterprise.admin.target.Target; 40 import com.sun.enterprise.admin.target.TargetType; 41 42 51 public class DeploymentTargetFactoryPEImpl extends DeploymentTargetFactory { 56 57 private static final TargetType[] VALID_DEPLOYMENT_TYPES = new TargetType[] {TargetType.DAS}; 58 59 62 public DeploymentTargetFactoryPEImpl() {} 63 64 67 public TargetType[] getValidDeploymentTargetTypes() { 68 return this.VALID_DEPLOYMENT_TYPES; 69 } 70 71 82 public DeploymentTarget getTarget(ConfigContext configContext, String domainName, String targetName) throws IASDeploymentException 83 { 84 try{ 85 final Target target = TargetBuilder.INSTANCE.createTarget(VALID_DEPLOYMENT_TYPES, 88 targetName, configContext); 89 if (targetName == null) { 90 targetName = target.getName(); 91 } 92 return new ServerDeploymentTarget(configContext , domainName, targetName); 93 } catch(Throwable t){ 94 throw new IASDeploymentException("Error:" + t.getMessage(), t); 95 } 96 } 97 98 105 public DeploymentTarget getTarget(ConfigContext configContext, String domainName) throws IASDeploymentException 106 { 107 return getTarget(configContext, domainName, null); 108 } 109 110 } 111 | Popular Tags |