Examples of SunTargetModuleID


Examples of com.sun.enterprise.deployapi.SunTargetModuleID

    /**
     * initialize the target module IDs with the passed application moduleID
     * and the descriptors
     */
    protected void initializeTargetModuleIDs(String moduleID) {
        SunTargetModuleID parentTargetModuleID = new SunTargetModuleID(moduleID, target);       
        parentTargetModuleID.setModuleType(getModuleType());
       
        targetModuleIDs = new SunTargetModuleID[1];       
        targetModuleIDs[0] = parentTargetModuleID;
    }
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTargetModuleID

        ModuleType type = status == null
                        ? getModuleType()
                        : DeploymentClientUtils.getXModuleType(status, key, xKey);

        for(int i=0; i<targetsList.length; i++) {
            SunTargetModuleID parentTargetModuleID = new SunTargetModuleID(moduleID, targetsList[i]);
            parentTargetModuleID.setModuleType(type);
            targetModuleIDs[i] = parentTargetModuleID;

            if (status != null) {
                // let's get the host name and port where the application was deployed
                HostAndPort webHost=null;
                try {
                    Object[] params = new Object[]{ moduleID, Boolean.FALSE };
                    String[] signature = new String[]{ "java.lang.String", "boolean"};
                    ObjectName applicationsMBean = new ObjectName(APPS_CONFIGMBEAN_OBJNAME);               
                    webHost = (HostAndPort) mbsc.invoke(applicationsMBean, "getHostAndPort", params, signature);                       
                } catch(Exception e) {
                    Print.dprintStackTrace(e.getLocalizedMessage(), e);
                }

                key = moduleID + KEY_SEPARATOR + SUBMODULE_COUNT;
                if (status.getProperty(key) == null) { //standalone module
                    if (ModuleType.WAR.equals(type) ||
                            XModuleType.isExtensionModule(type)) {
                        key = moduleID + KEY_SEPARATOR + CONTEXT_ROOT;
                        String contextRoot = status.getProperty(key);
                        if(contextRoot != null)
                        initTargetModuleIDWebURL(parentTargetModuleID, webHost, contextRoot, mbsc);
                     }
                } else {
                    int counter = (Integer.valueOf(status.getProperty(key))).intValue();
                    // now for each sub module           
                    for (int j = 0; j < counter; j++) {
                        //subModuleID
                        key = moduleID + KEY_SEPARATOR + MODULE_ID + KEY_SEPARATOR + String.valueOf(j);
                        String subModuleID = status.getProperty(key);
                        SunTargetModuleID subModule = new SunTargetModuleID(subModuleID, targetsList[i]);

                        //subModuleType
                        key = subModuleID + KEY_SEPARATOR + MODULE_TYPE;
                        xKey = subModuleID + KEY_SEPARATOR + XMODULE_TYPE;
                        //type = XModuleType.getModuleType((new Integer(status.getProperty(key))).intValue());
                        type = DeploymentClientUtils.getXModuleType(
                                                              status, key, xKey);
                        subModule.setModuleType(type);
                        if (ModuleType.WAR.equals(type) && webHost!=null) {
                            key = subModuleID + KEY_SEPARATOR + CONTEXT_ROOT;
                            String contextRoot = status.getProperty(key);
                            initTargetModuleIDWebURL(subModule, webHost, contextRoot, mbsc);
                        }
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTargetModuleID

            deploymentStatus.setMessage(message);
            deploymentStatus.setState(state); // retain current state
  }
       
        /* send notification */
  SunTargetModuleID tmi = new SunTargetModuleID(moduleID, aTarget);
        tmi.setModuleType(getModuleType());
  fireProgressEvent(new ProgressEvent(this, tmi, depStatus));
    }
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTargetModuleID

            }
            if(!checkStatusAndAddStage(targets[i], null,
                            localStrings.getString("enterprise.deployment.client.change_state", action, moduleID, targets[i].getName()), dasConnection, stat, state)) {
                return;
            }
            resultTargetModuleIDs.add(new SunTargetModuleID(moduleID, targets[i]));
        }

        // initialize the instance variable targetModuleIDs using
        // the successful module ids
        this.targetModuleIDs = new TargetModuleID[resultTargetModuleIDs.size()];
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTargetModuleID

            for(int k=0; k<appRefs.length; k++) {
                SunTarget aTarget = new SunTarget(serverId);
                aTarget.setAppServerInstance(targets[i]);
                aTarget.setConnectionSource(dasConnection);
                DeployedItemRefConfig item = (DeployedItemRefConfig) appRefs[k];
                SunTargetModuleID tgtId =  new SunTargetModuleID(item.getRef(), aTarget);
                tmpVector.add(tgtId);
            }
        }
        SunTargetModuleID[] result = new SunTargetModuleID[tmpVector.size()];
        return (TargetModuleID[]) tmpVector.toArray(result);
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTargetModuleID

                       localStrings.getString("enterprise.deployment.client.remove_reference", targetList[i].getName()), dasConnection, stat)) {
                        return;
                    }
                    rollback.addTarget(targetList[i], RollBackAction.APP_REF_DELETED);
                }
                resultTargetModuleIDs.add(new SunTargetModuleID(moduleID, targetList[i]));
            }
           
            // initialize the instance variable targetModuleIDs using
            // the successful module ids
            this.targetModuleIDs = new TargetModuleID[resultTargetModuleIDs.size()];
View Full Code Here

Examples of com.sun.enterprise.deployapi.SunTargetModuleID

                    if(!checkStatusAndAddStage(targetList[i], rollback,
                                localStrings.getString("enterprise.deployment.client.undeploy_remove_ref", targetList[i].getName()), dasConnection, stat)) {
                        return;
                    }
                    rollback.addTarget(targetList[i], RollBackAction.APP_REF_DELETED);
                    resultTargetModuleIDs.add(new SunTargetModuleID(moduleID, targetList[i]));
                }
            }
           
            // if undeploy from "domain" with no existing application-ref
            if ((TargetType.DOMAIN.equals(targetList[0].getName()))) {
                DeploymentClientUtils.setResourceOptions(
                    deployOptions,
                    DeploymentProperties.RES_UNDEPLOYMENT,
                    targetList);
            } else {
                DeploymentClientUtils.setResourceOptions(
                    deployOptions,
                    DeploymentProperties.RES_NO_OP,
                    targetList);
            }
            // Call DeploymentMgr to start undeploy
            fireProgressEvent(StateType.RUNNING, localStrings.getString("enterprise.deployment.client.undeploying"), domain);
            Map undeployStatus = deplMgr.undeploy(moduleID, deployOptions);           
           
            com.sun.appserv.management.deploy.DeploymentStatus finalStatusFromMBean =
                            DeploymentSupport.mapToDeploymentStatus(undeployStatus);
            DeploymentStatus tmp = DeploymentClientUtils.getDeploymentStatusFromAdminStatus(finalStatusFromMBean);
            if(!checkStatusAndAddStage(domain, null, localStrings.getString("enterprise.deployment.client.undeploy_from_domain"), dasConnection, tmp)) {
                return;
            }
           
            // undeploy over - add this to the result target module ID
            resultTargetModuleIDs.add(new SunTargetModuleID(moduleID, domain));
               
            // initialize the instance variable targetModuleIDs using
            // the successful module ids
            this.targetModuleIDs = new TargetModuleID[resultTargetModuleIDs.size()];
            this.targetModuleIDs =
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.