Package com.sun.enterprise.deployment

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


        String classPath=null;
        String[] urls = context.getClasspathUrls();
       
        // we need to add all web and appclient classpath
        Application app = (Application) context.getDescriptor();
        List moduleList = EJBClassPathUtils.getApplicationClassPath(app, context.getSrcDir().getAbsolutePath());
       
        moduleList.addAll(java.util.Arrays.asList(urls));
        for (int i=0;i<moduleList.size();i++) {
            if (classPath==null) {
View Full Code Here


     *@param manager The instance manager for the module
     *@return The top level Descriptor object
     */
    public static RootDeploymentDescriptor getDescriptor(
            String appId, BaseManager manager) throws IASDeploymentException {
        Application application = manager.getRegisteredDescriptor(appId);
        if (application != null) {
            if (application.isVirtual()) {
                return application.getStandaloneBundleDescriptor();
            } else {
                return application;
            }
        }

        //Now, load from disk
        FileArchive in = new FileArchive();
        try {
            String appDir = manager.getLocation(appId);
            // if is system predeployed app, load from original app dir
            // else load from generated/xml dir
            // print a warning if generated/xml dir is not there
            // and load from original dir (upgrade scenario)
            if (manager.isSystemAdmin(appId)) {
                in.open(appDir);
            } else {
                String xmlDir = manager.getGeneratedXMLLocation(appId);
                if (FileUtils.safeIsDirectory(xmlDir)) {
                    /*
                     * If default-web.xml is more recent than the generated
                     * directory, then the generated descriptor does not reflect
                     * the current contents of default-web.xml.
                     */
                    File xmlDirFile = new File(xmlDir);
                    if (xmlDirFile.lastModified() < DOLLoadingContext.defaultWebXMLLastModified()) {
                        _logger.log(Level.INFO, "enterprise.deployment.backend.default_web_xml_more_recent",
                                new Object[] {appId, appDir});
                        in.open(appDir);
                    } else {
                        in.open(xmlDir);
                    }
                } else {
                    // log a warning message in the server log
                    _logger.log(Level.WARNING,
                        "enterprise.deployment.backend.no_generated_xmldir",
                        new Object[]{appId, xmlDir, appDir});
                    in.open(appDir);
                }
            }

            Archivist archivist = null;
            if (manager instanceof AppsManager) {
                archivist = new ApplicationArchivist();
            } else if (manager instanceof EjbModulesManager) {
                archivist = new EjbArchivist();
            } else if (manager instanceof WebModulesManager) {
                archivist = new WebArchivist();
            } else if (manager instanceof AppclientModulesManager) {
                archivist = new AppClientArchivist();
            } else if (manager instanceof ConnectorModulesManager) {
                archivist = new ConnectorArchivist();
            }

            archivist.setAnnotationProcessingRequested(false);
            archivist.setXMLValidation(false);
            Application desc = ApplicationArchivist.openArchive(
                                        appId, archivist, in, true);

            //note: we are not reading back the persistence information here
            //we could, if ever the tools need it.
            if (!desc.isVirtual()) {
                archivist.setHandleRuntimeInfo(false);
                ((ApplicationArchivist)
                    archivist).readModulesDescriptors(desc, in);
                // now process runtime DDs
                archivist.setHandleRuntimeInfo(true);
                archivist.readRuntimeDeploymentDescriptor(in, desc);
            } else {
                return (BundleDescriptor)
                        desc.getBundleDescriptors().iterator().next();
            }
            return desc;
        } catch (Exception ex) {
            _logger.log(Level.SEVERE,
                        "enterprise.deployment.backend.get_descriptor_failed",
View Full Code Here

            ClassLoader appLoader = registry.getClassLoaderForApplication(id);
            if (appLoader == null) {
                return null;
            }

            Application appDesc = registry.getApplication(appLoader);
            
            // Check to see if this app had deployed successfully (4663247)
            if(appDesc == null){
                Object[] params = { id };
                _logger.log(Level.SEVERE, "webcontainer.notLoaded", params);
                return null;
            }

            //Hercules: add
            ConfigContext eventConfigContext = j2eeAppBean.getConfigContext();
            //end Hercules: add                    
            String j2eeApplication = appDesc.getRegistrationName();

            /*
             * START IT 6849: Create work directory up to the EAR file's
             * name beforehand, in order to avoid race condition later on,
             * when each of the EAR file's bundled webapps is started
             */
            if (j2eeApplication != null && !"".equals(j2eeApplication) &&
                    _appsWorkRoot != null) {
                StringBuilder dir = new StringBuilder();
                dir.append(_appsWorkRoot);
                dir.append(File.separator);
                dir.append(FileUtils.makeFriendlyFilename(
                    j2eeApplication.trim()));
                new File(dir.toString()).mkdirs();
            }
            // END IT 6849

            Set wbds = appDesc.getWebBundleDescriptors();
            WebBundleDescriptor wbd = null;
            com.sun.enterprise.config.serverbeans.WebModule wm = null;
            WebModuleConfig wmInfo = null;
            for (Iterator itr = wbds.iterator(); itr.hasNext(); ) {
                StringBuffer dir = new StringBuffer(location);
View Full Code Here

       boolean result = true;

       ApplicationRegistry registry = ApplicationRegistry.getInstance();
            ClassLoader appLoader = registry.getClassLoaderForApplication(id);
            if (appLoader != null) {
                Application appDesc = registry.getApplication(appLoader);
            
                // Check to see if this app had deployed successfully (4663247)
                if(appDesc == null){
                    Object[] params = { id };
                    _logger.log(Level.SEVERE, "webcontainer.notLoaded",
                                params);
                } else {
                    //end Hercules: add                    
                    String j2eeApplication = appDesc.getRegistrationName();
                    Set wbds = appDesc.getWebBundleDescriptors();
                    WebBundleDescriptor wbd = null;
                    for (Iterator itr = wbds.iterator(); itr.hasNext(); ) {
                        wbd = (WebBundleDescriptor) itr.next();

                        try {
View Full Code Here

            ClassLoader appLoader = registry.getClassLoaderForApplication(id);
            if (appLoader == null) {
                return;
            }

            Application appDesc = registry.getApplication(appLoader);
            
            // Check to see if this app had deployed successfully (4663247)
            if(appDesc == null){
                Object[] params = { id };
                _logger.log(Level.SEVERE, "webcontainer.notLoaded",
                            params);
                return;
            }

            //Hercules: add
            ConfigContext eventConfigContext = j2eeAppBean.getConfigContext();
            //end Hercules: add                    
            String j2eeApplication = appDesc.getRegistrationName();

            /*
             * START IT 6849: Create work directory up to the EAR file's
             * name beforehand, in order to avoid race condition later on,
             * when each of the EAR file's bundled webapps is started
             */
            if (j2eeApplication != null && !"".equals(j2eeApplication) &&
                    _appsWorkRoot != null) {
                StringBuilder dir = new StringBuilder();
                dir.append(_appsWorkRoot);
                dir.append(File.separator);
                dir.append(FileUtils.makeFriendlyFilename(
                    j2eeApplication.trim()));
                new File(dir.toString()).mkdirs();
            }
            // END IT 6849

            Set ebds = appDesc.getExtnBundleDescriptors();
            WebBundleDescriptor wbd = null;
            WebModuleConfig wmInfo = null;
            for (Iterator itr = ebds.iterator(); itr.hasNext(); ) {
                StringBuffer dir = new StringBuffer(location);
                wbd = (WebBundleDescriptor) itr.next();
View Full Code Here

            ClassLoader appLoader = registry.getClassLoaderForApplication(id);
            if (appLoader == null) {
                return null;
            }

            Application appDesc = registry.getApplication(appLoader);
            
            // Check to see if this app had deployed successfully (4663247)
            if(appDesc == null){
                Object[] params = { id };
                _logger.log(Level.SEVERE, "webcontainer.notLoaded", params);
                return null;
            }

            //Hercules: add
            ConfigContext eventConfigContext = j2eeAppBean.getConfigContext();
            //end Hercules: add                    
            String j2eeApplication = appDesc.getRegistrationName();

            /*
             * START IT 6849: Create work directory up to the EAR file's
             * name beforehand, in order to avoid race condition later on,
             * when each of the EAR file's bundled webapps is started
             */
            if (j2eeApplication != null && !"".equals(j2eeApplication) &&
                    _appsWorkRoot != null) {
                StringBuilder dir = new StringBuilder();
                dir.append(_appsWorkRoot);
                dir.append(File.separator);
                dir.append(FileUtils.makeFriendlyFilename(
                    j2eeApplication.trim()));
                new File(dir.toString()).mkdirs();
            }
            // END IT 6849

            Set wbds = appDesc.getWebBundleDescriptors();
            WebBundleDescriptor wbd = null;
            com.sun.enterprise.config.serverbeans.WebModule wm = null;
            WebModuleConfig wmInfo = null;
            for (Iterator itr = wbds.iterator(); itr.hasNext(); ) {
                StringBuffer dir = new StringBuffer(location);
View Full Code Here

       boolean result = true;

       ApplicationRegistry registry = ApplicationRegistry.getInstance();
            ClassLoader appLoader = registry.getClassLoaderForApplication(id);
            if (appLoader != null) {
                Application appDesc = registry.getApplication(appLoader);
            
                // Check to see if this app had deployed successfully (4663247)
                if(appDesc == null){
                    Object[] params = { id };
                    _logger.log(Level.SEVERE, "webcontainer.notLoaded",
                                params);
                } else {
                    //end Hercules: add                    
                    String j2eeApplication = appDesc.getRegistrationName();
                    Set wbds = appDesc.getWebBundleDescriptors();
                    WebBundleDescriptor wbd = null;
                    for (Iterator itr = wbds.iterator(); itr.hasNext(); ) {
                        wbd = (WebBundleDescriptor) itr.next();

                        try {
View Full Code Here

            ClassLoader appLoader = registry.getClassLoaderForApplication(id);
            if (appLoader == null) {
                return;
            }

            Application appDesc = registry.getApplication(appLoader);
            
            // Check to see if this app had deployed successfully (4663247)
            if(appDesc == null){
                Object[] params = { id };
                _logger.log(Level.SEVERE, "webcontainer.notLoaded",
                            params);
                return;
            }

            //Hercules: add
            ConfigContext eventConfigContext = j2eeAppBean.getConfigContext();
            //end Hercules: add                    
            String j2eeApplication = appDesc.getRegistrationName();

            /*
             * START IT 6849: Create work directory up to the EAR file's
             * name beforehand, in order to avoid race condition later on,
             * when each of the EAR file's bundled webapps is started
             */
            if (j2eeApplication != null && !"".equals(j2eeApplication) &&
                    _appsWorkRoot != null) {
                StringBuilder dir = new StringBuilder();
                dir.append(_appsWorkRoot);
                dir.append(File.separator);
                dir.append(FileUtils.makeFriendlyFilename(
                    j2eeApplication.trim()));
                new File(dir.toString()).mkdirs();
            }
            // END IT 6849

            Set ebds = appDesc.getExtnBundleDescriptors();
            WebBundleDescriptor wbd = null;
            WebModuleConfig wmInfo = null;
            for (Iterator itr = ebds.iterator(); itr.hasNext(); ) {
                StringBuffer dir = new StringBuffer(location);
                wbd = (WebBundleDescriptor) itr.next();
View Full Code Here

    /**
    * return whether the bean is a "virtual" app - i.e. a stand-alone
    * ejb module
    */    
    private boolean isVirtualApplication() {
        Application application = _ejbDescriptor.getApplication();
        return application.isVirtual();
    }
View Full Code Here

    * return the name of the application to which the bean belongs
    * it will be the j2ee app name if the bean is part of a j2ee app
    * it will be the ejb module name if the bean is a stand-alone ejb module
    */    
    private String getApplicationName() {
        Application application = _ejbDescriptor.getApplication();
        return application.getRegistrationName();
    }   
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.