Examples of DeployableObjectType


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

    public DeploymentStatus start(String moduleID, String targetName,
        Map options) throws IASDeploymentException {
        try {
            long startTime = System.currentTimeMillis();
            DeployableObjectType type =
                DeploymentServiceUtils.getRegisteredType(moduleID);
       
            final DeploymentTarget target =
                DeploymentServiceUtils.getDeploymentTarget(targetName);
           
            InstanceEnvironment env =
                ApplicationServer.getServerContext().getInstanceEnvironment();
            DeploymentRequest req = new DeploymentRequest(
                                    env,
                                    type,
                                    DeploymentCommand.DEPLOY);

            int actionCode;
            if(type.isAPP()) {
                actionCode = BaseDeployEvent.APPLICATION_DEPLOYED;
            }
            else {
                actionCode = BaseDeployEvent.MODULE_DEPLOYED;
            }
View Full Code Here

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

    }

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

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

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

    public DeploymentStatus stop(String moduleID, String targetName,
        Map options) throws IASDeploymentException {
        try {
            long startTime = System.currentTimeMillis();
            DeployableObjectType type =
                DeploymentServiceUtils.getRegisteredType(moduleID);
    
            final DeploymentTarget target =
                DeploymentServiceUtils.getDeploymentTarget(targetName);
       
            InstanceEnvironment env =
                ApplicationServer.getServerContext().getInstanceEnvironment();
            DeploymentRequest req = new DeploymentRequest(
                                    env,
                                    type,
                                    DeploymentCommand.UNDEPLOY);
               
            int actionCode;
            if(type.isAPP()) {
                actionCode = BaseDeployEvent.APPLICATION_UNDEPLOYED;
            }  
            else {
                actionCode = BaseDeployEvent.MODULE_UNDEPLOYED;
            }                      
View Full Code Here

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

             *Save the current time to use in preparing the audit info later so
             *the audit measurement includes all the logic below.
             */
            long startTime = System.currentTimeMillis();
            sLogger.log(Level.FINE, "mbean.begin_deploy", moduleID);
            DeployableObjectType type = null;
            if (dProps.getType() != null) {
                type = DeploymentServiceUtils.getDeployableObjectType(dProps.getType());
            } else {
                type = DeploymentServiceUtils.getTypeFromFile(
                            moduleID, deployFile.getAbsolutePath());
            }       

            InstanceEnvironment env =
                ApplicationServer.getServerContext().getInstanceEnvironment();
            DeploymentRequest req = new DeploymentRequest(
                                    env,
                                    type,
                                    DeploymentCommand.DEPLOY);
   
            DeploymentRequestRegistry.getRegistry().addDeploymentRequest(
                moduleID, req);

            req.setName(moduleID);
            boolean isRegistered = false;
            isRegistered = DeploymentServiceUtils.isRegistered(moduleID, type);
            // FIXME validation for new REDEPLOY property

            if (isRegistered) {
                DeploymentServiceUtils.validate(moduleID,type,REDEPLOY_ACTION, req);
            }

            req.setFileSource(deployFile);
            req.setDeploymentPlan(planFile);
            req.setForced(dProps.getForce());
            // Set the context Root for extension modules
            if(type.isWEB() || req.isExtensionModule()) {
                req.setDefaultContextRoot(dProps.getDefaultContextRoot(
                    archiveName));
                req.setContextRoot(dProps.getContextRoot());
            }
            req.setVerifying(dProps.getVerify());
View Full Code Here

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

            /*
             *Save the current time to use in preparing the audit info later so
             *the audit measurement includes all the logic below.
             */
            long startTime = System.currentTimeMillis();
            DeployableObjectType objectType =
                DeploymentServiceUtils.getRegisteredType(mModuleID);

            DeploymentServiceUtils.checkAppReferencesBeforeUndeployFromDomain(
                mModuleID);

            if (objectType.isWEB()) {
                DeploymentServiceUtils.checkWebModuleReferences(mModuleID);
            }

            InstanceEnvironment env =
                ApplicationServer.getServerContext().getInstanceEnvironment();
View Full Code Here

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

                            throws DeploymentException
    {
        DeploymentProperties dProps = new DeploymentProperties(props);
        String archiveName = dProps.getArchiveName();
        String name = dProps.getName(archiveName);
        DeployableObjectType type = getTypeFromFile(name, archiveName);
        if(archiveName == null)
            throw new IllegalArgumentException("archiveName not specified");
      
        sLogger.log(Level.FINE, "mbean.begin_deploy", archiveName);               
              
        java.io.File deployFile = new java.io.File(archiveName);
        int actionCode = BaseDeployEvent.APPLICATION_DEPLOYED; 
        try {
            InstanceEnvironment env = new InstanceEnvironment(getInstanceName());
            DeploymentRequest req = new DeploymentRequest(
                                        env,
                                        type,
                                        DeploymentCommand.DEPLOY);
           
           
            /* If app exists & forceDeploy is false it's an error.
             * It should be detected by the deployment backend.
             */
            boolean isRegistered = false ; //isRegistered(name, type);
            ObjectName componentON =
                getRegisteredComponentObjectName(name, type);

            if(componentON != null)
                isRegistered = true;

            if(isRegistered)
                validate(componentON, REDEPLOY_ACTION);

            if(type.isAPP())
            {
                actionCode = BaseDeployEvent.APPLICATION_DEPLOYED;
            }
            else
            {
                actionCode = BaseDeployEvent.MODULE_DEPLOYED;
            }
     
            req.setFileSource(deployFile);
            req.setName(name);
            req.setForced(dProps.getForce());
            // for redeployment
            req.setCascade(true);
            if(type.isWEB() || req.isExtensionModule()) {
                req.setDefaultContextRoot(dProps.getDefaultContextRoot(
                    archiveName));
                req.setContextRoot(dProps.getContextRoot());
            }
            req.setVerifying(dProps.getVerify());
View Full Code Here

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

            throw new DeploymentException("name not specified in undeploy");
       
        sLogger.log(Level.FINE, "mbean.begin_undeploy", name);
        try {
                      
            DeployableObjectType objectType = getRegisteredType(name);

            ObjectName componentON =
                getRegisteredComponentObjectName(name,objectType);
            validate(componentON, UNDEPLOY_ACTION);

            //BUG 4739891 begin
            if (objectType.isWEB()) {
                checkWebModuleReferences(name);
            }
            //BUG 4739891 end
            DeploymentRequest req = new DeploymentRequest(
                                         new InstanceEnvironment(getInstanceName()),
                                         objectType, DeploymentCommand.UNDEPLOY);
            DeploymentProperties dProps = new DeploymentProperties(props);
            req.setName(name);
            req.setCascade(dProps.getCascade());
            req.setReload(dProps.getReload());
            req.setForced(false);
            req.setExternallyManagedPath(dProps.getExternallyManaged());
            DeploymentServiceUtils.setResourceOptionsInRequest(req, dProps);
           
            props = dProps.prune();

            req.addOptionalArguments(props);
           
            if(objectType.isAPP())
                req.setActionCode(BaseDeployEvent.APPLICATION_UNDEPLOYED);
            else               
                req.setActionCode(BaseDeployEvent.MODULE_UNDEPLOYED);
           
            final DeploymentTarget target = getAndValidateDeploymentTarget(dProps.getTarget(),
View Full Code Here

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

     */
    private String[] getAvailableModules(String moduleType, String[] targetList,
            boolean excludeSystemApps)
            throws MBeanConfigException {
        try{
            DeployableObjectType type = getDeployableObjectType(moduleType);
            ArrayList listOfModules = new ArrayList();
            for(int i = 0 ; i< targetList.length;i++)
            {
                listOfModules.addAll(getModules(targetList[i], type, null, excludeSystemApps));
            }
View Full Code Here

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

     */
    private String[] getRunningModules(String moduleType, String[] targetList,
            boolean excludeSystemApps)
    throws MBeanConfigException {
        try{
            DeployableObjectType type = getDeployableObjectType(moduleType);
            ArrayList listOfModules= new ArrayList();
            for (int i = 0; i < targetList.length; i++) {
                listOfModules.addAll(getModules(targetList[i], type,
                                                Boolean.valueOf(true),
                                                excludeSystemApps));
View Full Code Here

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

     */
    private String[] getNonRunningModules(String moduleType,
            String[] targetList, boolean excludeSystemApps)
    throws MBeanConfigException {
        try{
            DeployableObjectType type = getDeployableObjectType(moduleType);
            ArrayList listOfModules= new ArrayList();
            for (int i = 0; i < targetList.length; i++) {
                listOfModules.addAll(getModules(targetList[i], type,
                                                Boolean.valueOf(false),
                                                excludeSystemApps));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.