Package org.apache.geronimo.j2ee.deployment

Examples of org.apache.geronimo.j2ee.deployment.EARContext.addGBean()


        GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
        //N.B. use earContext not moduleContext
        //TODO fix this for javaee 5 !!!
        resourceEnvironmentSetter.setResourceEnvironment(rebuilder, webApp.getResourceRef(), jettyWebApp.getResourceRefArray());
        try {
            moduleContext.addGBean(webModuleData);

            // configure WebAppContextManager with right priority so that it starts last
            AbstractName contextManagerName = earContext.getNaming().createChildName(moduleName, "WebAppContextManager", NameFactory.SERVICE_MODULE);
            GBeanData contextManagerGBean = new GBeanData(contextManagerName, WebAppContextManager.class);
            contextManagerGBean.setPriority(100);
View Full Code Here


            // configure WebAppContextManager with right priority so that it starts last
            AbstractName contextManagerName = earContext.getNaming().createChildName(moduleName, "WebAppContextManager", NameFactory.SERVICE_MODULE);
            GBeanData contextManagerGBean = new GBeanData(contextManagerName, WebAppContextManager.class);
            contextManagerGBean.setPriority(100);
            contextManagerGBean.setReferencePattern("webApp", moduleName);
            moduleContext.addGBean(contextManagerGBean);

            // configure hosts and virtual-hosts
            configureHosts(earContext, jettyWebApp, webModuleData);

            String contextPath = webModule.getContextRoot();
View Full Code Here

                GBeanData securityFactoryData = new GBeanData(factoryName, AuthConfigProviderHandlerFactory.class);
                securityFactoryData.setAttribute("messageLayer", MESSAGE_LAYER);
                String contextPath = (String) webModuleData.getAttribute("contextPath");
                securityFactoryData.setAttribute("appContext", "server " + contextPath);
                configureConfigurationFactory(jettyWebApp, null, securityFactoryData);
                moduleContext.addGBean(securityFactoryData);
                configureLocalJaspicProvider(new JettyAuthenticationWrapper(authType), contextPath, module, securityFactoryData);
                webModuleData.setReferencePattern("SecurityHandlerFactory", factoryName);
                //otherwise rely on pre-configured jaspi
            } else {
                if ((loginConfigInfo != null && loginConfigInfo.realmName != null) || jettyWebApp.isSetSecurityRealmName()) {
View Full Code Here

                        if (loginConfigInfo.realmName != null) {
                            webModuleData.setAttribute("realmName", loginConfigInfo.realmName);
                        }
                    }
                    securityFactoryData.setAttribute("authMethod", auth);
                    moduleContext.addGBean(securityFactoryData);
                    webModuleData.setReferencePattern("SecurityHandlerFactory", factoryName);
                } else {
                    log.warn("partial security info but no realm to authenticate against");
                }
            }
View Full Code Here

        Map contextIDToPermissionsMap = new HashMap();
        contextIDToPermissionsMap.put("test_J2EEApplication=null_J2EEServer=bar_j2eeType=WebModule_name=geronimo/test/1.0/war", componentPermissions);
        jaccBeanData.setAttribute("contextIdToPermissionsMap", contextIDToPermissionsMap);
//        jaccBeanData.setAttribute("principalRoleMap", new HashMap());
        jaccBeanData.setAttribute("roleDesignates", new HashMap());
        earContext.addGBean(jaccBeanData);
        earContext.getGeneralData().put(GeronimoSecurityBuilderImpl.ROLE_MAPPER_DATA_NAME, jaccBeanName);
        module.setEarContext(earContext);
        module.setRootEarContext(earContext);
        builder.initContext(earContext, module, bundle);
        builder.addGBeans(earContext, module, bundle, null);
View Full Code Here

            throw new DeploymentException("Could not read auth config", e);
        } catch (XMLStreamException e) {
            throw new DeploymentException("Could not read auth config", e);
        }
        if (authConfigProviderData != null) {
            moduleContext.addGBean(authConfigProviderData);
            securityFactoryData.addDependency(authConfigProviderData.getAbstractName());
        }
    }

    private boolean cleanupConfigurationDir(File configurationDir) {
View Full Code Here

                moduleBuilder.initContext(earContext, module, bundle);
                moduleBuilder.addGBeans(earContext, module, bundle, Collections.singleton(repository));
                // add the module validator so the connector artifacts will resolve to an instance
                AbstractName abstractName = earContext.getNaming().createChildName(module.getModuleName(), "ValidatorFactory", NameFactory.VALIDATOR_FACTORY);
                GBeanData gbeanData = new GBeanData(abstractName, ValidatorFactoryGBean.class);
                earContext.addGBean(gbeanData);

                ConfigurationData configurationData = earContext.getConfigurationData();
                AbstractName moduleAbstractName = earContext.getModuleName();
                earContext.close();
View Full Code Here

                } catch (DeploymentException e) {
                    throw e;
                } catch (Exception e) {
                    throw new DeploymentException("Unable to construct jndi context for AppClientModule GBean", e);
                }
                appClientDeploymentContext.addGBean(jndiContextGBeanData);


                // finally add the app client container
                ObjectName appClientContainerName = ObjectName.getInstance("geronimo.client:type=ClientContainer");
                GBeanData appClientContainerGBeanData = new GBeanData(appClientContainerName, AppClientContainer.GBEAN_INFO);
View Full Code Here

                    appClientContainerGBeanData.setReferencePattern("JNDIContext", jndiContextName);
                    appClientContainerGBeanData.setReferencePattern("TransactionContextManager", transactionContextManagerObjectName);
                } catch (Exception e) {
                    throw new DeploymentException("Unable to initialize AppClientModule GBean", e);
                }
                appClientDeploymentContext.addGBean(appClientContainerGBeanData);

                // get the configuration data
                appClientConfigurationData = appClientDeploymentContext.getConfigurationData();
            } finally {
                if (appClientDeploymentContext != null) {
View Full Code Here

        WebAppType webApp = (WebAppType) webModule.getSpecDD();
        TomcatWebAppType tomcatWebApp = (TomcatWebAppType) webModule.getVendorDD();

        GBeanData webModuleData = new GBeanData(moduleName, TomcatWebAppContext.GBEAN_INFO);
        try {
            moduleContext.addGBean(webModuleData);
            webModuleData.setReferencePattern("J2EEServer", moduleContext.getServerName());
            if (!module.isStandAlone()) {
                webModuleData.setReferencePattern("J2EEApplication", earContext.getModuleName());
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.