Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.WebBundleDescriptor


                        app = appsMgr.getDescriptor(appId);
                    } catch (ConfigException ce) {
                        // log a warning   
                    }
                    if (app != null) {
                        WebBundleDescriptor wbd
                            = app.getWebBundleDescriptorByUri(modName);
                        if (wbd != null) {
                            ctxRoot = wbd.getContextRoot();
                        }
                    }
                }
            }
        } else if (parent instanceof WebModule) {
View Full Code Here


                    // log a warning
                    _logger.fine("The descriptor for application " + appId +
                            " could not be loaded: " + ce.getMessage());
                }
                if (app != null) {
                    WebBundleDescriptor wbd
                            = app.getWebBundleDescriptorByUri(modId);
                    if (wbd != null) {
                        secPart = wbd.getContextRoot();
                    }
                }
            }
            if (secPart == null) {
                // not getting the context root from the descriptor
View Full Code Here

            return getInvalidAnnotatedElementHandlerResult(
                ainfo.getProcessingContext().getHandler(), ainfo);
        }
       
        WebBundleContext wbc = (WebBundleContext) aeHandler;
        WebBundleDescriptor descrptor = wbc.getDescriptor();
       
        if ( !( descrptor instanceof SipBundleDescriptor) )
        {
          theirLog.log(Level.SEVERE, LOGPREFIX + "webBundleContext.getDescriptor() is not a SipBundleDescriptor");
            return getDefaultFailedResult();
View Full Code Here

        }

        //parse the web and SIP DDs

        Application application = null;
        WebBundleDescriptor wbd = null;

        // check if this is a converged app. The rule is the presence of a
        // web.xml
        if (hasDDXML(moduleRootDirectory, WEB_JAR_ENTRY)) {
            setConverged(true);
        } else {
            setConverged(false);
        }

        // now check is this a sub-module of an Enterprise Application
        if (getJ2eeApplication()) {
            // we know that its a sub-module in a EAR
            wbd = (WebBundleDescriptor) getBundleDescriptor(moduleDir,
                    parentClassLoader);

            //((SipBundleDescriptor)wbd).setConverged(isConverged());
        } else if (!isStartup && (moduleDir.indexOf("nodeagents") < 0)) {
            // deployment operation
            //set the module type to be WAR
            this.setModuleType(ModuleType.WAR);
            processWebArchive();
            application = getApplication();
            //set the module type back to the archive deployer type
            this.setModuleType(XModuleType.getModuleType(
                    this.getClass().getName()));

            if (application != null) {
                wbd = (WebBundleDescriptor) application.getStandaloneBundleDescriptor();
            }
        } else {
            //this.setModuleType(ModuleType.WAR);

            // loading application during AS startup
            // Obtain the application object
            application = getApplication(moduleName, moduleRootDirectory,
                    moduleScratchDirectory, moduleType);

            //set the module type back to the archive deployer type
            //this.setModuleType(XModuleType.getModuleType(
            //                    this.getClass().getName()));           
            if (application != null) {
                wbd = (WebBundleDescriptor) application.getStandaloneBundleDescriptor();
            }
        }
       
        // check if we have sip.xml or its a DD-less archive
        // If there is a DD we read it, else we initialize the DD objects for annotation
        // processing.
        if (hasDDXML(moduleRootDirectory, SIP_JAR_ENTRY)) {
            readSipDeploymentDescriptors(moduleRootDirectory);
        } else {
            sbd = new SipBundleDescriptor();
            SipApplication sipApplication = new SipApplication();
            sbd.setSipApplication(sipApplication);
        }
        // set the module name
        sbd.getSipApplication().setModuleName(moduleName);
        //set the Referring Decsriptor
        sbd.getSipApplication().setReferringDescriptor(sbd);
        sbd.setConverged(isConverged());

        // copy the web bundle descriptor contents to sbd.
        if (wbd != null) {
            ifwbd.getServletDescriptors().size() > 2 ) {
                sbd.setContainsHTTPServlets(true);
            }
            sbd.copyWebBundleDescriptor(wbd);
            sbd.setApplication(application);
        }
View Full Code Here

    /**
     * Returns the default web.xml representation
     * @return the class the represents the default-web.xml
     */
    public Descriptor getDefaultBundleDescriptor() {
        WebBundleDescriptor webBundleDesc = DOLLoadingContextFactory.getDefaultWebBundleDescriptor();

        return webBundleDesc;
    }
View Full Code Here

    public static WebBundleDescriptor initDefaultWebBundleDescriptor() {
        DOLLoadingContextFactory.setParsingDefaultWebXML(true);

        FileInputStream fis = null;

        WebBundleDescriptor wbd = null;
        try {
            // parse default-web.xml contents
            // (this path will not be invoked by portable static verifier)
            if (ApplicationServer.getServerContext() != null) {
                File file = getDefaultWebXMLFile();
View Full Code Here

   
    public void deploy() throws IASDeploymentException {
        //set the DeployableObjectType to WEB
        request.setDeployableObjectType(DeployableObjectType.WEB);
        application = super.loadDescriptors();
        WebBundleDescriptor bundleDesc =
                (WebBundleDescriptor) application.getStandaloneBundleDescriptor();
       
        // This is where we set the context root
        /** The rules for setting context root are as follows :
         * Check if the app is converged Application ( presence if web.xml)
         * if yes, follow the same rules as a web application
         * if no there is no context root
         */
        if(isConverged()) {
            if (request.getContextRoot() == null ||
                request.getContextRoot().trim().equals("")) {
                if (bundleDesc.getContextRoot() != null &&
                    !bundleDesc.getContextRoot().trim().equals("")) {
                         request.setContextRoot(bundleDesc.getContextRoot());
                } else {
                        request.setContextRoot(request.getDefaultContextRoot());
                }
            }
        }
View Full Code Here

            throws Exception {
        if (frameworkContext.isPartition() &&
                !frameworkContext.isWebServicesClient())
            return;

        WebBundleDescriptor desc = (WebBundleDescriptor) descriptor;
        WebServiceClientCheckMgrImpl webServiceClientCheckMgr = new WebServiceClientCheckMgrImpl(
                frameworkContext);
        if (desc.hasWebServiceClients()) {
            Set serviceRefDescriptors = desc.getServiceReferenceDescriptors();
            Iterator it = serviceRefDescriptors.iterator();

            while (it.hasNext()) {
                webServiceClientCheckMgr.setVerifierContext(context);
                webServiceClientCheckMgr.check(
View Full Code Here

            // loads the deployment descriptors
      Application app = loadDescriptors();
            // Set the generated XML directory in application desc
            request.getDescriptor().setGeneratedXMLDirectory(xmlDir.getAbsolutePath());
     
            WebBundleDescriptor bundleDesc = (WebBundleDescriptor) app.getStandaloneBundleDescriptor();

            // The priority order of how the context root should be used:
            // 1. Context root specified by user (via --contextRoot option
            // or via gui), i.e. request.getContextRoot()
            // 2. Context root specified in sun-web.xml i.e.
            // bundleDesc.getContextRoot()
            // 3. The default context root (archive name etc) i.e.
            // req.getDefaultContextRoot()

            if (request.getContextRoot() == null ||
                request.getContextRoot().trim().equals("")) {
                if (bundleDesc.getContextRoot() != null &&
                    !bundleDesc.getContextRoot().trim().equals("")) {
                    request.setContextRoot(bundleDesc.getContextRoot());
                } else {
                    request.setContextRoot(request.getDefaultContextRoot());
                }
            }
View Full Code Here

                webModulesMgr =
                    (WebModulesManager)createConfigManager(getInstanceEnv(),
                                                           moduleEnv);
            }
      Application app = request.getDescriptor();
            WebBundleDescriptor wbd = (WebBundleDescriptor) app.getStandaloneBundleDescriptor();
          
            // other things like creating the WebSecurityManager
            // this should create all permissions
            WebSecurityManager.createManager(wbd,true);
           
View Full Code Here

TOP

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

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.