Package org.apache.geronimo.gbean

Examples of org.apache.geronimo.gbean.GBeanData.addDependency()


            AbstractName tssLinkName = module.getEarContext().getNaming().createChildName(ejbName, "tssRef" + i, "TSSLink");
            GBeanData tssLinkData = new GBeanData(tssLinkName, TSSLinkGBean.GBEAN_INFO);
            tssLinkData.setAttribute("jndiNames", jndiNames);
            tssLinkData.setReferencePattern("EJB", ejbName);
            tssLinkData.setReferencePattern("TSSBean", tssBeanName);
            tssLinkData.addDependency(ejbModuleName);
            try {
                module.getEarContext().addGBean(tssLinkData);
            } catch (GBeanAlreadyExistsException e) {
                throw new DeploymentException("tss link gbean already present", e);
            }
View Full Code Here


            AbstractName tssLinkName = module.getEarContext().getNaming().createChildName(ejbName, "tssLink" + i, "TSSLink");
            GBeanData tssLinkData = new GBeanData(tssLinkName, TSSLinkGBean.GBEAN_INFO);
            tssLinkData.setAttribute("jndiNames", jndiNames);
            tssLinkData.setReferencePattern("EJB", ejbName);
            tssLinkData.setReferencePattern("TSSBean", tssBeanName);
            tssLinkData.addDependency(ejbModuleName);
            try {
                module.getEarContext().addGBean(tssLinkData);
            } catch (GBeanAlreadyExistsException e) {
                throw new DeploymentException("tss link gbean already present", e);
            }
View Full Code Here

    public void testGBeanDependency() throws Exception {
        AbstractName parentName = kernel.getNaming().createRootName(new Artifact("test", "foo", "1", "car"), "parent", "parent");
        GBeanData gbeanDataParent = new GBeanData(parentName, MockGBean.getGBeanInfo());
        GBeanData gbeanDataChild = new GBeanData(kernel.getNaming().createChildName(parentName, "child", "child"), MockGBean.getGBeanInfo());
        gbeanDataChild.addDependency(new ReferencePatterns(parentName));
        kernel.loadGBean(gbeanDataChild, bundleContext);
        kernel.startGBean(gbeanDataChild.getAbstractName());
        assertEquals(State.STARTING_INDEX, kernel.getGBeanState(gbeanDataChild.getAbstractName()));
        kernel.loadGBean(gbeanDataParent, bundleContext);
        assertEquals(State.STARTING_INDEX, kernel.getGBeanState(gbeanDataChild.getAbstractName()));
View Full Code Here

                    ejbWebServiceGBean.setAttribute("policyContextID", policyContextID);
                    ejbWebServiceGBean.setAttribute("properties", properties);
                }
            }

            ejbWebServiceGBean.addDependency(module.getModuleName());

            if (jaxwsBuilder.configureEJB(ejbWebServiceGBean, bean.ejbName, ejbModule,
                                          ejbModule.getSharedContext(), bundle)) {

                try {
View Full Code Here

                    String policyContextID = sessionName.toString();
                    ejbWebServiceGBean.setAttribute("policyContextID", policyContextID);
                }
            }

            ejbWebServiceGBean.addDependency(module.getModuleName());
            if (axisBuilder.configureEJB(ejbWebServiceGBean, ejbName, ejbModule,
                                         ejbModule.getSharedContext(), bundle)) {

                try {
                    earContext.addGBean(ejbWebServiceGBean);
View Full Code Here

                    String policyContextID = sessionName.toString();
                    ejbWebServiceGBean.setAttribute("policyContextID", policyContextID);
                }
            }

            ejbWebServiceGBean.addDependency(module.getModuleName());
            if (axisBuilder.configureEJB(ejbWebServiceGBean, ejbName, ejbModule,
                                         ejbModule.getSharedContext(), bundle)) {

                try {
                    earContext.addGBean(ejbWebServiceGBean);
View Full Code Here

        FilterMappingType[] filterMappingArray = webApp.getFilterMappingArray();
        for (FilterMappingType filterMappingType : filterMappingArray) {
            String filterName = filterMappingType.getFilterName().getStringValue().trim();
            GBeanData filterMappingData = new GBeanData(JettyFilterMapping.GBEAN_INFO);
            if (previous != null) {
                filterMappingData.addDependency(previous);
            }
            filterMappingData.setReferencePattern("JettyServletRegistration", moduleName);
            AbstractName filterAbstractName = earContext.getNaming().createChildName(moduleName, filterName, NameFactory.WEB_FILTER);

            AbstractName filterMappingName = null;
View Full Code Here

                Set<AbstractName> servletNameSet = new HashSet<AbstractName>();
                for (int j = 0; j < filterMappingType.sizeOfServletNameArray(); j++) {
                    String servletName = filterMappingType.getServletNameArray(j).getStringValue().trim();
                    AbstractName abstractServletName = earContext.getNaming().createChildName(moduleName, servletName, NameFactory.SERVLET);
                    servletNameSet.add(abstractServletName);
                    filterMappingData.addDependency(abstractServletName);
                }

                filterMappingData.setReferencePatterns("Servlets", servletNameSet);
                filterMappingName = earContext.getNaming().createChildName(filterAbstractName, ObjectName.quote(Arrays.deepToString(servletNameSet.toArray())), NameFactory.SERVLET_WEB_FILTER_MAPPING);
View Full Code Here

            moduleContext.addGBean(filterGBeanData);
            //add a mapping to /*

            GBeanData filterMappingGBeanData = new GBeanData(JettyFilterMapping.GBEAN_INFO);
            if (previous != null) {
                filterMappingGBeanData.addDependency(previous);
            }
            filterMappingGBeanData.setReferencePattern("JettyServletRegistration", moduleName);
            String urlPattern = "/*";
            filterMappingGBeanData.setAttribute("urlPattern", urlPattern);
            AbstractName filterMappingName = earContext.getNaming().createChildName(defaultFilterAbstractName, urlPattern, NameFactory.URL_WEB_FILTER_MAPPING);
View Full Code Here

        // link to previous servlet, if there is one, so that we
        // preserve the <load-on-startup> ordering.
        // http://issues.apache.org/jira/browse/GERONIMO-645
        if (null != previousServlet) {
            servletData.addDependency(previousServlet);
        }

        //TODO in init param setter, add classpath if jspFile is not null.
        servletData.setReferencePattern("JettyServletRegistration", webModuleName);
        servletData.setAttribute("servletName", servletName);
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.