Package com.sun.enterprise.deployment.backend

Examples of com.sun.enterprise.deployment.backend.DeployableObjectType


        // XXX: A deployableObjectType is obtained here for this module type.
        // There is no immediate use for this object here, but it adds a new
        // DeployableObjectType corresponding to this module type. This is used
        // in the undeploy action.
        DeployableObjectType depObjType =
                DeployableObjectType.getDeployableObjectType(moduleType);
        ienv = ApplicationServer.getServerContext().getInstanceEnvironment();
       
        try {
            configManager = new ExtensionModuleConfigManager(ienv, moduleType);
View Full Code Here


        // instance environment for this server
        InstanceEnvironment env =
            ApplicationServer.getServerContext().getInstanceEnvironment();

        // sets the type of the archive being deployed
        DeployableObjectType type = null;
        if ( FileUtils.isEar(archive) ) {
            type = DeployableObjectType.APP;
        } else if ( FileUtils.isJar(archive) ) {
            type = DeployableObjectType.EJB;
        } else if ( FileUtils.isWar(archive) ) {
            type = DeployableObjectType.WEB;
        } else if ( FileUtils.isRar(archive) ) {
            type = DeployableObjectType.CONN;
        }

        // constructs a deploy request with the given type
        DeploymentRequest req =
            new DeploymentRequest(env, type, DeploymentCommand.DEPLOY);

        // sets the archive that needs to be deployed
        req.setFileSource(archive);

        // application is registered with the name of the
        // archive without extension
        String fileName  = archive.getName();
        int dotIdx       = fileName.indexOf(fileName);
        String regName   = fileName.substring(0, dotIdx);
        req.setName(regName);

        // sets the web context root
        if (type.isWEB()) {
            req.setContextRoot(regName);
        }

        // redeploys the app if already deployed
        req.setForced(true);
View Full Code Here

    // used when adding app/module to config
    public static void addToConfig(DeploymentRequest request)
        throws IASDeploymentException {
        try {
            ConfigBean newApp = createNewModule(request.getType());
            DeployableObjectType type = request.getType();
           
            AttributeList attrList = populateAttributeList(request);
            for (Object obj : attrList) {
                Attribute attr = (Attribute) obj;
                newApp.setAttributeValue(attr.getName(), (String) attr.getValue());
View Full Code Here

     *Returns the DeployableObjectType for the particular type of ConfigBean.
     *@param module the ConfigBean of interest
     *@return the DeployableObjectType for the module
     */
    private static DeployableObjectType toDeployableObjectType(ConfigBean module) {
        DeployableObjectType result = null;
        if (module instanceof J2eeApplication) {
            result = DeployableObjectType.APP;
        } else if (module instanceof EjbModule) {
            result = DeployableObjectType.EJB;
        } else if (module instanceof WebModule) {
View Full Code Here

        if (AppVerification.doInstrument()) {
            AppVerification.getInstrumentLogger().handleChangeInDeployment();
        }

        String moduleID = req.getName();
        DeployableObjectType type = req.getType();
        DeploymentServiceUtils.validate(moduleID, type, UNDEPLOY_ACTION, req);

        // undeploy from DAS
        if (req.getTarget() != null) {
            result = executePhases(req, undeployPhaseList)
View Full Code Here

        boolean enabled, String virtualServers, String referenceName)
        throws IASDeploymentException {
        try {
            long startTime = System.currentTimeMillis();
            //FIXME: add validation code such as checking context root
            DeployableObjectType type =
                DeploymentServiceUtils.getRegisteredType(referenceName);
       
            final DeploymentTarget target =
                DeploymentServiceUtils.getAndValidateDeploymentTarget(
                    targetName, referenceName, false);
           
            InstanceEnvironment env =
                ApplicationServer.getServerContext().getInstanceEnvironment();
            DeploymentRequest req = new DeploymentRequest(
                                    env,
                                    type,
                                    DeploymentCommand.DEPLOY);

            /*
             * Force enabled to true for app client modules to address temporarily
             * issue 3248.
             */
            enabled = enabled || type.isCAR();
               
            req.setName(referenceName);
            req.setStartOnDeploy(enabled);
            req.setTarget(target);

View Full Code Here

     */
    public DeploymentStatus associate(String targetName,
        String referenceName, Map options) throws IASDeploymentException {
        try {
            long startTime = System.currentTimeMillis();
            DeployableObjectType type =
                DeploymentServiceUtils.getRegisteredType(referenceName);

            DeploymentProperties dProps = new DeploymentProperties(options);
           
            /*
             *A preexisting reference is allowed to exist if a redeployment
             *is underway and the reference's attributes are not changing
             *during the redeployment, so long as a
             *preceding disassociation phase has recorded this fact.
             */
            boolean enforceValidation = true;
            if (dProps.getRedeploy()) {
                /*
                 *Make sure this app ref was saved during an earlier disassociation.
                 */
                DeploymentContext.SavedApplicationRefInfo info =
                        deploymentContext.getSavedAppRef(referenceName, targetName);
                enforceValidation = (info == null);
            }

            /*
             * Force enabled to true for app client modules to address temporarily
             * issue 3248.
             */
            if (type.isCAR()) {
                dProps.setEnable(true);
            }
           
            final DeploymentTarget target = enforceValidation ?
                DeploymentServiceUtils.getAndValidateDeploymentTarget(
View Full Code Here

    }

    private DeploymentStatus disassociate(DeploymentRequest req, AuditInfo auditInfo)
        throws IASDeploymentException {
        String moduleID = req.getName();
        DeployableObjectType type = req.getType();
        DeploymentServiceUtils.validate(moduleID,type,DISASSOCIATE_ACTION, req);

        DeploymentStatus result = executePhases(req, disassociatePhaseList);
        if (auditInfo != null) {
            auditInfo.reportEnd(result.getStatus());
View Full Code Here

     */
    public DeploymentStatus disassociate(String targetName,
        String referenceName) throws IASDeploymentException {
        try {  
            long startTime = System.currentTimeMillis();
            DeployableObjectType type =
                DeploymentServiceUtils.getRegisteredType(referenceName);
           
            final DeploymentTarget target =
                DeploymentServiceUtils.getAndValidateDeploymentTarget(
                targetName, referenceName, true);
View Full Code Here

    public DeploymentStatus disassociate(String targetName,
        String referenceName, Map options) throws IASDeploymentException {
        try {
            long startTime = System.currentTimeMillis();
            DeployableObjectType type =
                DeploymentServiceUtils.getRegisteredType(referenceName);

            final DeploymentTarget target =
                DeploymentServiceUtils.getAndValidateDeploymentTarget(
                targetName, referenceName, true);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.backend.DeployableObjectType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.