Package com.sun.enterprise.web

Examples of com.sun.enterprise.web.WebApplication$EnvEntryCustomizer


    static WebModule getWebModule(WebServiceEndpoint wsep) {
        ApplicationRegistry appRegistry = org.glassfish.internal.api.Globals.getDefaultHabitat().getComponent(ApplicationRegistry.class);
        String appName = wsep.getBundleDescriptor().getApplication().getAppName();
        ApplicationInfo appInfo = appRegistry.get(appName);

        WebApplication webApp = null;
        if (appInfo != null) {
            Collection<ModuleInfo> moduleInfos = appInfo.getModuleInfos();
            Set<EngineRef> engineRefs = null;
            WebBundleDescriptor requiredWbd = (WebBundleDescriptor) wsep.getBundleDescriptor();
            for (ModuleInfo moduleInfo : moduleInfos) {
                engineRefs = moduleInfo.getEngineRefs();
                for (EngineRef engineRef : engineRefs) {
                    if (engineRef.getApplicationContainer() instanceof WebApplication) {
                        webApp = (WebApplication) engineRef.getApplicationContainer();
                        WebBundleDescriptor wbd = webApp.getDescriptor();
                        if (wbd.equals(requiredWbd)) {
                            break; //WebApp corresponding to wsep is found.
                        } else {
                            webApp = null;
                        }
                    }
                }
            }
        }
        //get the required WebModule from the webApp.
        if (webApp != null) {
            String requiredModule = ((WebBundleDescriptor) wsep.getBundleDescriptor()).getModuleName();
            Set<WebModule> webModules = webApp.getWebModules();
            for(WebModule wm : webModules) {
                if(wm.getModuleName().equalsIgnoreCase(requiredModule)) {
                    return wm;
                }
            }
View Full Code Here


    static WebModule getWebModule(WebServiceEndpoint wsep) {
        ApplicationRegistry appRegistry = org.glassfish.internal.api.Globals.getDefaultHabitat().getService(ApplicationRegistry.class);
        String appName = wsep.getBundleDescriptor().getApplication().getAppName();
        ApplicationInfo appInfo = appRegistry.get(appName);

        WebApplication webApp = null;
        if (appInfo != null) {
            Collection<ModuleInfo> moduleInfos = appInfo.getModuleInfos();
            Set<EngineRef> engineRefs = null;
            WebBundleDescriptor requiredWbd = (WebBundleDescriptor) wsep.getBundleDescriptor();
            for (ModuleInfo moduleInfo : moduleInfos) {
                engineRefs = moduleInfo.getEngineRefs();
                for (EngineRef engineRef : engineRefs) {
                    if (engineRef.getApplicationContainer() instanceof WebApplication) {
                        webApp = (WebApplication) engineRef.getApplicationContainer();
                        WebBundleDescriptor wbd = webApp.getDescriptor();
                        if (wbd.equals(requiredWbd)) {
                            break; //WebApp corresponding to wsep is found.
                        } else {
                            webApp = null;
                        }
                    }
                }
            }
        }
        //get the required WebModule from the webApp.
        if (webApp != null) {
            String requiredModule = ((WebBundleDescriptor) wsep.getBundleDescriptor()).getModuleName();
            Set<WebModule> webModules = webApp.getWebModules();
            for(WebModule wm : webModules) {
                if(wm.getModuleName().equalsIgnoreCase(requiredModule)) {
                    return wm;
                }
            }
View Full Code Here

    static WebModule getWebModule(WebServiceEndpoint wsep) {
        ApplicationRegistry appRegistry = org.glassfish.internal.api.Globals.getDefaultHabitat().getService(ApplicationRegistry.class);
        String appName = wsep.getBundleDescriptor().getApplication().getAppName();
        ApplicationInfo appInfo = appRegistry.get(appName);

        WebApplication webApp = null;
        if (appInfo != null) {
            Collection<ModuleInfo> moduleInfos = appInfo.getModuleInfos();
            Set<EngineRef> engineRefs = null;
            WebBundleDescriptor requiredWbd = (WebBundleDescriptor) wsep.getBundleDescriptor();
            for (ModuleInfo moduleInfo : moduleInfos) {
                engineRefs = moduleInfo.getEngineRefs();
                for (EngineRef engineRef : engineRefs) {
                    if (engineRef.getApplicationContainer() instanceof WebApplication) {
                        webApp = (WebApplication) engineRef.getApplicationContainer();
                        WebBundleDescriptor wbd = webApp.getDescriptor();
                        if (wbd.equals(requiredWbd)) {
                            break; //WebApp corresponding to wsep is found.
                        } else {
                            webApp = null;
                        }
                    }
                }
            }
        }
        //get the required WebModule from the webApp.
        if (webApp != null) {
            String requiredModule = ((WebBundleDescriptor) wsep.getBundleDescriptor()).getModuleName();
            Set<WebModule> webModules = webApp.getWebModules();
            for(WebModule wm : webModules) {
                if(wm.getModuleName().equalsIgnoreCase(requiredModule)) {
                    return wm;
                }
            }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.web.WebApplication$EnvEntryCustomizer

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.