Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.Application$DirectoryIntrospectionFilter


            ctxRoot = ((WebBundleDescriptor) bd).getContextRoot();
        } else {
            return;
        }
       
        Application app = bd.getApplication();
        if ( app == null) {
            String msg = _stringMgr.getString("Application_NotFound", appId);
            throw new RuntimeException(msg);
        }
        isStandAlone = app.isVirtual();

        Collection wsCollec = bd.getWebServices().getWebServices();
        Set wsSet = new HashSet();
        for (Iterator i1 = wsCollec.iterator(); i1.hasNext();) {
            WebService ws = (WebService) i1.next();
View Full Code Here


            // set isEjb to true in case of ejb embedded module
            if (modName.endsWith("jar")) {
                isEjb = true;
            } else {
                if (appsMgr != null) {
                    Application app = null;
                    try {
                        app = appsMgr.getDescriptor(appId);
                    } catch (ConfigException ce) {
                        // log a warning   
                    }
                    if (app != null) {
                        WebBundleDescriptor wbd
                            = app.getWebBundleDescriptorByUri(modName);
                        if (wbd != null) {
                            ctxRoot = wbd.getContextRoot();
                        }
                    }
                }
View Full Code Here

            ep = wse.getEndpointName();
        }
        //wse.resolveComponentLink();

        BundleDescriptor bundle = wse.getBundleDescriptor();
        Application app = bundle.getApplication();

        String fqn = 
        WebServiceMgrBackEnd.getManager().getFullyQualifiedName(
           app.getRegistrationName() ,
           bundle.getModuleDescriptor().getArchiveUri(),
           bundle.getModuleDescriptor().isStandalone(), ep);

        if (FilterRegistry.getInstance().isManaged(fqn) == false) {
            return null;
View Full Code Here

        String epName = null;
        if (wse != null) {
            epName = wse.getEndpointName();
        }
        BundleDescriptor bundle = wse.getBundleDescriptor();
        Application app = bundle.getApplication();
       
        String fqn = getFullyQualifiedName( app.getRegistrationName() ,
                bundle.getModuleDescriptor().getArchiveUri(),
                app.isVirtual(), epName);
        return fqn;
    }
View Full Code Here

       
        String vsProps = null;
        if ( !isEjb) {
            String secPart = ctxRoot;
            if ( secPart == null) {
                Application app = null;
                try {
                    app = appsMgr.getDescriptor(appId);
                } catch (ConfigException ce) {
                    // 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();
                    }
                }
            }
View Full Code Here

            SecurityRoleMapping srm = (SecurityRoleMapping) newDescriptor;
            descriptor.getSipApplication().
                    getSunSipDescriptor().addSecurityRoleMapping(srm);

            // store it in the application using pure DOL descriptors...
            Application app = descriptor.getApplication();

            if (app != null) {
                Role role = new Role(srm.getRoleName());
                SecurityRoleMapper rm = app.getRoleMapper();

                if (rm != null) {
                    List<PrincipalNameDescriptor> principals = srm.getPrincipalNames();

                    for (int i = 0; i < principals.size(); i++) {
View Full Code Here

        try {
            DeploymentEventInfo info = null;
            if (event !=null) {
                info = event.getEventInfo();
            }
            Application rootDD       = null;
            DeploymentRequest dr     = null;
            if (info != null) {
                rootDD = info.getApplicationDescriptor();
                dr = info.getDeploymentRequest();
            }
            CacheMgr mgr             = CacheMgr.getInstance();

            // post deploy event
            if ((event != null)
                    && (event.getEventType()==DeploymentEvent.POST_DEPLOY)) {

                // if an ejb module
                if (dr.isEjbModule()) {
                    Set ws = rootDD.getWebServiceDescriptors();
                    if ((ws != null) && !ws.isEmpty()) {
                        mgr.addEjbModule(dr.getName());
                        mgr.save();
                    }

                // if a web module
                } else if (dr.isWebModule()) {
                    Set ws = rootDD.getWebServiceDescriptors();
                    if ((ws != null) && !ws.isEmpty()) {
                        mgr.addWebModule(dr.getName());
                        mgr.save();
                    }

                // if application
                } else if (dr.isApplication()) {
                    List ejb = new ArrayList();
                    Set ejbBundles = rootDD.getEjbBundleDescriptors();

                    for (Iterator iter=ejbBundles.iterator(); iter.hasNext();) {
                        BundleDescriptor bd = (BundleDescriptor) iter.next();
                        WebServicesDescriptor wsDD = bd.getWebServices();
                        if (wsDD.hasWebServices()) {

                            // ejb bundle has web services
                            ejb.add(bd.getModuleDescriptor().getArchiveUri());
                        }
                    }

                    List web = new ArrayList();
                    Set webBundles = rootDD.getWebBundleDescriptors();
                    for (Iterator iter=webBundles.iterator(); iter.hasNext();) {
                        BundleDescriptor bd = (BundleDescriptor) iter.next();
                        WebServicesDescriptor wsDD = bd.getWebServices();
                        if (wsDD.hasWebServices()) {
View Full Code Here

            logger.log(Level.WARNING, e.toString());
        }

        //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
View Full Code Here

            }

            ApplicationDeploymentDescriptorFile addf =
                new ApplicationDeploymentDescriptorFile();
            fis = new FileInputStream(f);
            Application app = (Application) addf.read(fis);
            for (Iterator itr=app.getModules();itr.hasNext();) {
                ModuleDescriptor md = (ModuleDescriptor) itr.next();
                String uri = md.getArchiveUri();
                if (bundleName.equals(uri)) {
                    altDD = md.getAlternateDescriptor();
                    break;
View Full Code Here

        appArchive.open(destination.getAbsolutePath());
       
        archivist.setManifest(appArchive.getManifest());
       
        // read the standard deployment descriptors
        Application appDesc = null;
        if (archivist.hasStandardDeploymentDescriptor(appArchive)) {
            appDesc = (Application)
            archivist.readStandardDeploymentDescriptor(appArchive);
        } else {
            appDesc = Application.createApplication(appArchive,true);
        }

        archivist.setDescriptor(appDesc);
       
        // ok we should now have the list of modules, so we can happily explode them...
        Iterator<ModuleDescriptor> bundles = appDesc.getModules();
        while (bundles.hasNext()) {
           
            ModuleDescriptor bundle = bundles.next();
           
            String moduleName = bundle.getArchiveUri();
View Full Code Here

TOP

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

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.