Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.Application


            return true;
        }

        appLoader.setCascade(cascade);
        appLoader.setLoadUnloadAction(loadUnloadAction);
        Application app = appLoader.getApplication();

        if (handlePreUnloadAction) {
            // set jsr77 state to STOPPING
            try {
                appLoader.setState(StateManageable.STOPPING_STATE);
            } catch (MBeanException mbe) {
                _logger.log(Level.WARNING,
                    "core.error_while_setting_jsr77_state",mbe);
            }

            RoleMapper.removeRoleMapper(app.getRoleMapper().getName());

            if (jsr77) {
                //delete jsr77 mbean
                try {
                    appLoader.deleteLeafAndRootMBeans();
                } catch (MBeanException mbe) {
                    _logger.log(Level.WARNING,
                        "core.error_while_deleting_jsr77_leaf_and_root_mbeans",mbe);
                }
            } else {
                // set jsr77 state STOPPED
                try {
                    appLoader.setState(StateManageable.STOPPED_STATE);
                } catch (MBeanException mbe) {
                    _logger.log(Level.WARNING,
                       "core.error_while_setting_jsr77_state",mbe);
                }
            }
       
        }

        boolean undeployed = appLoader.unload(jsr77);

        if (loadUnloadAction == Constants.UNLOAD_REST) {
            return undeployed;
        }

        if (undeployed) {
            // since web modules are loaded separately,
            // at this point we can only claim ejbs to be
            // loaded successfully
            if (app.getEjbComponentCount() > 0) {
                _logger.log(Level.INFO,
                        "core.application_unloaded_ejb", appID);
            }
        } else {
            _logger.log(Level.INFO,
View Full Code Here


            // do this after rest of embedded rar is loaded
            if(event.getLoadUnloadAction() == Constants.LOAD_REST &&
                event.getForceDeploy()) {
                AbstractLoader appLoader = (AbstractLoader)id2loader.get(appName);
                if (appLoader != null) {
                    Application appDescriptor = appLoader.getApplication();
                    connecorResourcesLoader.loadEmbeddedRarResources(appName,appDescriptor);          
                }
            }
        } catch (ConfigException ce) {
            throw new AdminEventListenerException(ce.getMessage());
View Full Code Here

                registerException(event, msg);
            }
          
            AbstractLoader appLoader =
                (AbstractLoader)id2loader.get(appName);
            Application appDescriptor = appLoader.getApplication();
            if (appDescriptor != null) {
                connecorResourcesLoader.loadEmbeddedRarResources(
                            appName,appDescriptor);
            } else {
                _logger.log(Level.FINE,
View Full Code Here

        DeploymentTarget target = (DeploymentTarget)req.getTarget();
        DeploymentStatus status = phaseCtx.getDeploymentStatus();

        int loadUnloadAction = Constants.UNLOAD_ALL;

        Application app = DeploymentServiceUtils.getInstanceManager(
               req.getType()).getRegisteredDescriptor(req.getName());

        // store the application object in DeploymentContext before it's
        // removed from instance manager cache
        deploymentCtx.addApplication(req.getName(), app);
       
        if(!req.isApplication())
        {        
            type = DeploymentServiceUtils.getModuleTypeString(req.getType());
        } else {
            if ( (app != null) && (app.getRarComponentCount() != 0) ) {
                loadUnloadAction = Constants.UNLOAD_REST;
            }
        }
       
        prePhaseNotify(getPrePhaseEvent(req));
View Full Code Here

            // Set context class loader to application class loader
            container.externalPreInvoke();

            // compute realmName
            String realmName = null;
            Application app = ejbEndpoint.getEndpoint().getBundleDescriptor().getApplication();
            if (app != null) {
                realmName = app.getRealm();
            }
            if (realmName == null) {
                realmName = ejbEndpoint.getEndpoint().getRealm();
            }
View Full Code Here

        int loadUnloadAction = Constants.LOAD_ALL;
       
        if(req.isApplication()) {
            type = null;
            Application app = DeploymentServiceUtils.getInstanceManager(
               DeployableObjectType.APP).getRegisteredDescriptor(req.getName());

            if ( (app != null) && (app.getRarComponentCount() != 0) ) {
                loadUnloadAction = Constants.LOAD_REST;
            }
        }
        else {
            type = DeploymentServiceUtils.getModuleTypeString(req.getType());
View Full Code Here

        DeploymentRequest req = phaseCtx.getDeploymentRequest();
        DeploymentTarget target = (DeploymentTarget)req.getTarget();

        // set the descriptor on request so we can get it in Deployers code
        ExtensionModuleDeployer extDeployer = null;
        Application app = deploymentCtx.getApplication(req.getName());
        req.setDescriptor(app);
       
        // Clear out the reference to the class loader
        if (app != null) {
            app.setClassLoader(null);
        }

        Deployer deployer = null;
        try{           
            if (!req.isExtensionModule()) {
View Full Code Here

     * to or null if this is a standalone web module.
     */
    private String getAppName() {
        String name = null;
        if (_wbd != null) {
            Application app = _wbd.getApplication();
            if ((app != null) && !app.isVirtual()) {
                String appName = app.getRegistrationName();
                if ((appName != null) && (appName.length() > 0)) {
                    name = appName.trim();
                }
            }
        }
View Full Code Here

        if (info instanceof BundleDescriptor) {
            BundleDescriptor bundle = (BundleDescriptor)info;
            rc.append(bundle.getApplication().getRegistrationName());

            Application application = bundle.getApplication();
            if (!application.isVirtual()) {
                String modulePath = bundle.getModuleDescriptor().getArchiveUri();
                int l = modulePath.length();

                // Remove ".jar" from the module's jar name.
                rc.append(DatabaseConstants.NAME_SEPARATOR).
View Full Code Here

     *
     * @param element the xml element
     * @param value it's associated value
     */
    public void setElementValue(XMLElement element, String value) {
        Application application = (Application)getDescriptor();
        if (element.getQName().equals(
            ApplicationTagNames.LIBRARY_DIRECTORY)) {         
            application.setLibraryDirectory(value);
        } else super.setElementValue(element, value);
    }  
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.Application

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.