Package javax.enterprise.deploy.shared

Examples of javax.enterprise.deploy.shared.ModuleType


            }
        }
    }
   
     private RealmAdapter getRealmAdapter(WebBundleDescriptor wbd, boolean isSystemApp, String realmName) {
        ModuleType mType = ((wbd != null) ? wbd.getModuleType() : ModuleType.WAR);
        String mTyString = mType.toString();
        if ("org.jvnet.glassfish.comms.deployment.backend.SipArchiveDeployer".equals(mTyString)) {
            String realmClassName = PluggableContextInfo.getCustomRealmAdapter(mType.toString());
            RealmAdapter adapter = null;
            try {
                Class realmClass = Class.forName(realmClassName);
                Constructor ctor = realmClass.getConstructor(
                        new Class[]{com.sun.enterprise.deployment.WebBundleDescriptor.class, boolean.class, String.class});
View Full Code Here


        moduleID = (String) args[2];
        CommandType newState = (CommandType) args[3];
        SunTarget domain = (SunTarget) args[4];
        StringManager localStrings = StringManager.getManager(getClass());

        ModuleType moduleType;
        try {
            moduleType = DeploymentClientUtils.getModuleType(
                dasConnection.getExistingMBeanServerConnection(), moduleID);
        } catch (Throwable ioex) {
            finalDeploymentStatus.setStageException(ioex);
            setupForAbnormalExit(localStrings.getString("enterprise.deployment.client.unrecognized_module_type", moduleID ,ioex.getMessage()),
                        domain);
            return;
        }
       
        boolean state = false;
        String action = "Disable";
        if (CommandType.START.equals(newState)) {
            state = true;
            action = "Enable";
        }

        // the target module ids in which the operation was successful
        ArrayList resultTargetModuleIDs = new ArrayList();            

        for(int i=0; i<targets.length; i++) {
            DeploymentStatus stat = new DeploymentStatus();
            stat.setStageDescription(
                localStrings.getString("enterprise.deployment.client.state_change_desc", action, moduleID));
            try {
                /*
                 *If the module type supports state changes, change the state.
                 *Otherwise prepare a warning status with a "no-op" message.
                 */
                String messageKey;
                int deplStatus;
                if (! unchangeableStateModuleTypes.contains(moduleType)) {
                    messageKey = "enterprise.deployment.client.state_change_success";
                    deplStatus = DeploymentStatus.SUCCESS;
                   
                    DeploymentClientUtils.changeStateOfModule(dasConnection.getExistingMBeanServerConnection(), moduleID,
                                    ((moduleType == null) ? null : moduleType.toString()), targets[i], state);
                } else {
                    messageKey = "enterprise.deployment.client.state_change_noop";
                    deplStatus = DeploymentStatus.SUCCESS;
                }
                stat.setStageStatus(deplStatus);
View Full Code Here

                for (Iterator iter = applicationDD.getEjbBundleDescriptors().iterator(); iter.hasNext();) {
                    String name =
                        EJBSecurityManager.getContextID((EjbBundleDescriptor)iter.next());
                    SecurityUtil.generatePolicyFile(name);
                }
               ModuleType mt = XModuleType.getModuleType("org.jvnet.glassfish.comms.deployment.backend.SipArchiveDeployer");
               Set extDescSet = applicationDD.getBundleDescriptors(mt);
               // Set extDescSet = applicationDD.getExtnBundleDescriptors();

               Iterator sitr = extDescSet.iterator();
               while (sitr.hasNext()) {
View Full Code Here

                    }
                }      


           
                ModuleType mt = XModuleType.getModuleType("org.jvnet.glassfish.comms.deployment.backend.SipArchiveDeployer");

                ExtensionModuleDeployer emd = PluggableDeploymentInfo.getExtensionModuleDeployer(mt);
                if (emd != null) {
                    ArchiveDeployer ad = emd.getDeployer();
                    try {
View Full Code Here

            DeploymentStatus status, ConnectionSource conn)
                throws IOException {
        String sep = DeploymentStatus.KEY_SEPARATOR;
        String key = keyPrefix + sep + DeploymentStatus.MODULE_TYPE;
        String xKey = keyPrefix + sep + DeploymentStatus.XMODULE_TYPE;
        ModuleType moduleType = getXModuleType(status, key, xKey);

        //only EAR, WAR and EJB archives could contain wsdl files for publish
        if (!(ModuleType.EAR.equals(moduleType) ||
              ModuleType.WAR.equals(moduleType) ||
              ModuleType.EJB.equals(moduleType))) {
View Full Code Here

        Object[] params     = new Object[] {moduleID};
        String[] signature  = new String[] {"java.lang.String"};
        MBeanServerConnection mbsc =
                        dasConnection.getExistingMBeanServerConnection();
        try {
            ModuleType moduleType = getModuleType(mbsc, moduleID);

            // only ejb, appclient, application are applicable for
            // retrieving client stubs
            if (!(ModuleType.EJB.equals(moduleType) ||
                ModuleType.CAR.equals(moduleType) ||
View Full Code Here

   
    public static ModuleType getXModuleType(
            com.sun.enterprise.deployment.backend.DeploymentStatus status,
                                                               String key,
                                                                  String xKey) {
        ModuleType type = null;
        if(status.getProperty(key) != null) {
            type =
                XModuleType.getModuleType(
                         (new Integer(status.getProperty(key))).intValue());
            if( type != null) {
View Full Code Here

        targetModuleIDs = new SunTargetModuleID[targetsList.length];
        String moduleID = status == null
                        ? this.moduleID : status.getProperty(MODULE_ID);
        String key = moduleID + KEY_SEPARATOR + MODULE_TYPE;
        String xKey = moduleID + KEY_SEPARATOR + XMODULE_TYPE;
        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]);
View Full Code Here

     *
     * @param descriptor WebServices descriptor
     */
    public void check(Descriptor descriptor) throws Exception {
        WebServicesDescriptor rootDescriptor = (WebServicesDescriptor) descriptor;
        ModuleType moduleType = rootDescriptor.getBundleDescriptor()
                .getModuleType();
        if (moduleType == ModuleType.EJB)
            moduleName = Result.EJB;
        else if (moduleType == ModuleType.WAR)
            moduleName = Result.WEB;
View Full Code Here

        } catch (IllegalStateException e) {
            throw new DeploymentSyntaxException(e.getMessage(), e);
        }

        for (int i = 0; i < modules.length; i++) {
            ModuleType type = ((TargetModuleIDImpl)modules[i]).getType();
            if (type != null) {
                if (type.equals(ModuleType.WAR) || type.equals(ModuleType.EAR) || type.equals(ModuleType.EJB) || type.equals(ModuleType.RAR) || type.equals(ModuleType.CAR)) {
                    apps.add(((TargetModuleIDImpl)modules[i]).getModuleID());
                }
            }
        }
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.shared.ModuleType

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.