Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.Application


        } catch (MBeanException mbe) {
            _logger.log(Level.WARNING,
                "core.error_while_setting_jsr77_state",mbe);
        }

        Application app = modLoader.getApplication();
        RoleMapper.removeRoleMapper(app.getRoleMapper().getName());

        if (jsr77) {
            // delete jsr77 mBean for this ejbModule
            try {
                modLoader.deleteRootMBean();
View Full Code Here


           key = moduleID + sep + DeploymentStatus.MODULE_TYPE;
           status.addProperty(key, String.valueOf(moduleType.getValue())); //moduleType           
        }
       
        //sub modules
        Application app = request.getDescriptor();
        if (app!=null) {
            if (!app.isVirtual()) {
                int counter = 0;
                for (Iterator it = app.getModules(); it.hasNext();) {
                    ModuleDescriptor md = (ModuleDescriptor) it.next();

                    key = moduleID + sep +
                          DeploymentStatus.MODULE_ID + sep +
                          String.valueOf(counter);
                    String subModuleID = moduleID + "#" + md.getArchiveUri();
                    status.addProperty(key, subModuleID); //subModuleID
                    if( XModuleType.isExtensionModule(md.getModuleType())) {
                        key = subModuleID + sep + DeploymentStatus.XMODULE_TYPE;
                    } else {
                        key = subModuleID + sep + DeploymentStatus.MODULE_TYPE;
                    }
                    //subModuleType
                    status.addProperty(key, String.valueOf(md.getModuleType().getValue()));

                    if (ModuleType.WAR.equals(md.getModuleType())) {
                        WebBundleDescriptor wbd =
                            (WebBundleDescriptor) md.getDescriptor();
                        key = subModuleID + sep + DeploymentStatus.CONTEXT_ROOT;
                        status.addProperty(key, getContextRoot(wbd)); //contextRoot
                    }
                    counter++;
                }

                key = moduleID + sep + DeploymentStatus.SUBMODULE_COUNT;
                status.addProperty(key, String.valueOf(counter)); //nums
            } else { //standalone module
                BundleDescriptor bd = app.getStandaloneBundleDescriptor();
                if (ModuleType.WAR.equals(bd.getModuleType())) {
                    WebBundleDescriptor wbd = (WebBundleDescriptor) bd;
                    key = moduleID + sep + DeploymentStatus.CONTEXT_ROOT;
                    status.addProperty(key, getContextRoot(wbd)); //contextRoot
                }
View Full Code Here

              ModuleType.EJB.equals(moduleType))) {
            return;
        }

        String sep = DeploymentStatus.KEY_SEPARATOR;
        Application app = request.getDescriptor();
        String moduleID = request.getName();
        AbstractArchive moduleArchive = null;
        String key = null;
        String keyPrefix = null;

        FileArchive archive = new FileArchive();
        archive.open(RelativePathResolver.resolvePath(
                        getGeneratedAppLocation(request)));

        for (Iterator it = app.getWebServiceDescriptors().iterator();
                it.hasNext();) {
            WebService webService = (WebService) it.next();
            // No work needed if webservice is configured for URL publishing
            if (!webService.hasFilePublishing()) {
                continue;
            }

            // For file publishing, URL is a file URL for a directory
            String clientPublishURL =
                    webService.getClientPublishUrl().toExternalForm();
            if (app.isVirtual()) { //standalone module
                keyPrefix = moduleID;
                moduleArchive = archive;
            else {
                ModuleDescriptor md =
                        webService.getBundleDescriptor().getModuleDescriptor();
View Full Code Here

    }

    private ApplicationClientDescriptor getApplicationClientDescriptor() {
  ApplicationClientDescriptor appCD = null;
  try {
            Application app = configManager.getDescriptor(this.id, null, false);
            appCD = (ApplicationClientDescriptor) app.getStandaloneBundleDescriptor();
        } catch(ConfigException ex) {
            _logger.log(Level.WARNING,"Failed to get the ApplicationClientDescriptor");
        }
  return appCD;
    }
View Full Code Here

                        ApplicationRegistry registry =
                                ApplicationRegistry.getInstance();
                        ClassLoader appLoader =
                                registry.getClassLoaderForApplication(id);
                        if (appLoader != null) {
                            Application appDesc =
                                    registry.getApplication(appLoader);
                           
                            //get the extn bundle descriptors
                            Set ebds = appDesc.getExtnBundleDescriptors();
                            BundleDescriptor descriptor = null;
                            // for each descriptor
                            for(Iterator itr =ebds.iterator(); itr.hasNext();) {
                                descriptor = (BundleDescriptor)itr.next();
                                if(!( descriptor instanceof BundleDescriptor)) {
View Full Code Here

        String epAppName = null;
        WebServiceEndpoint wse = endpoint.getDescriptor();
        if (wse != null) {
            BundleDescriptor bd = wse.getBundleDescriptor();
            if (bd != null) {
                Application app = bd.getApplication();
                if (app != null) {
                    epAppName = app.getRegistrationName();
                }
            }
        }

        webContainer.registerAdHocPathAndSubtree(
View Full Code Here

    public static String[] getContextRootsForEmbeddedWebApp(String appName)
        throws IASDeploymentException {
        try {
            AppsManager appsManager =
                new AppsManager(new InstanceEnvironment(getInstanceName()));
            Application application =
                appsManager.getRegisteredDescriptor(appName);
            // if the application already loaded on DAS
            if (application != null) {
                ArrayList contextRoots = new ArrayList();
                for (Iterator itr = application.getWebBundleDescriptors().iterator(); itr.hasNext();) {
                    WebBundleDescriptor wbd = (WebBundleDescriptor) itr.next();
                    contextRoots.add(wbd.getContextRoot());
                }
                return (String[])contextRoots.toArray(new String[contextRoots.size()]);
            // if not, read from disk
View Full Code Here

            getFilenameFilter(SUN_RESOURCE_XML), true);

        // get the expected paths
        ArrayList<String> expectedXMLPaths = new ArrayList<String>();

        Application app = getInstanceManager(
            moduleType).getRegisteredDescriptor(appId);

        // The only case it could be null is during undeployment
        // and when the application is already unregistered from
        // instance manager. In that case, get it from the deployment
        // context cache.
        if (app == null && deploymentCtx != null) {
            app = deploymentCtx.getApplication(appId);
        }

        if (app != null) {
            if (app.isVirtual()) {
                // for standalone module, it's under the root META-INF
                expectedXMLPaths.add(SUN_RESOURCE_XML_PATH);
            } else {
                // for application
                // first add the one under app root
                expectedXMLPaths.add(SUN_RESOURCE_XML_PATH);
                // then add the ones under sub module root
                for (Iterator itr = app.getModules();itr.hasNext();) {
                    ModuleDescriptor aModule =
                        (ModuleDescriptor) itr.next();
                    String moduleUri = FileUtils.makeFriendlyFileName(
                        aModule.getArchiveUri());
                    String subModulePath = moduleUri +
View Full Code Here

        {
            if (req.isConnectorModule()) {
                containsRar = true;
            }
        } else {
            Application app = getInstanceManager(DeployableObjectType.APP
                ).getRegisteredDescriptor(req.getName());

            if ( (app != null) && (app.getRarComponentCount() != 0) ) {
                containsRar = true;
            }
        }
        return containsRar;
View Full Code Here

        // if resource list is null, it means it needs to
        // read in sun-resource.xml and parse it,
        // if resource list is empty, it means it's been processed
        // but no sun-resource.xml is found
        Application app = getInstanceManager(req.getType()
            ).getRegisteredDescriptor(req.getName());

        if (app == null && deploymentCtx != null) {
            app = deploymentCtx.getApplication(req.getName());
        }
                                                                               
        if (app != null && app.getResourceList() != null &&
            !isForceParsing) { 
            // first try to get the in-memory copy from application
            // always re-set the list from disk when isForceParsing is
            // set to true
            resourceList = (List<Resource>)app.getResourceList();
        } else {
            // then try to get it from resources.xml
            // and set in the application object
            resourceList = getResourcesFromResourcesXML(
                req.getName(), req.getType(), deploymentCtx);
            if (app != null) {
                app.setResourceList(resourceList);
            }
        }
                                                                               
        return resourceList;
    }
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.