Package org.apache.openejb.assembler.classic

Examples of org.apache.openejb.assembler.classic.EjbJarInfo


        deployer.deploy(appModule);

        AppInfo appInfo = new AppInfo();
        for (EjbModule ejbModule : appModule.getEjbModules()) {
            try {
                EjbJarInfo ejbJarInfo = ejbJarInfoBuilder.buildInfo(ejbModule);

                Map<String, EjbDeployment> deploymentsByEjbName = ejbModule.getOpenejbJar().getDeploymentsByEjbName();

                for (EnterpriseBeanInfo bean : ejbJarInfo.enterpriseBeans) {
                    EjbDeployment d = deploymentsByEjbName.get(bean.ejbName);
View Full Code Here


        public void addEjbJar(EjbJarInfo ejbJarInfo) {
            ejbJars.put(ejbJarInfo.moduleId, ejbJarInfo);
        }

        public EjbJarInfo getEjbJar(String moduleId) throws DeploymentException {
            EjbJarInfo ejbJarInfo = ejbJars.get(moduleId);
            if (ejbJarInfo == null) {
                throw new DeploymentException("Ejb jar configuration passed but expected module " +
                        moduleId + " was not found in configured module list " + ejbJars.keySet());
            }
            return ejbJarInfo;
View Full Code Here

    }

    public void initContext(EARContext earContext, Module module, ClassLoader classLoader) throws DeploymentException {
        EjbModule ejbModule = (EjbModule) module;

        EjbJarInfo ejbJarInfo = getEjbJarInfo(earContext, ejbModule, classLoader);

        ejbModule.setEjbJarInfo(ejbJarInfo);

        // update the original spec dd with the metadata complete dd
        EjbJar ejbJar = ejbModule.getEjbJar();
View Full Code Here

                addGeronimmoOpenEJBPersistenceUnit(ejbModule);
            }
        }

        // find our module
        EjbJarInfo ejbJarInfo = earData.getEjbJar(ejbModule.getEjbModule().getModuleId());
        return ejbJarInfo;
    }
View Full Code Here

            if (name.equals("cmp")) continue;
            String id = name + " " + rootUrl.hashCode();
            linkResolver.add(rootUrl, name, id);
        }

        EjbJarInfo ejbJarInfo = ejbModule.getEjbJarInfo();
        for (EnterpriseBeanInfo beanInfo : ejbJarInfo.enterpriseBeans) {
            if (beanInfo instanceof StatefulBeanInfo) {
                StatefulBeanInfo statefulBeanInfo = (StatefulBeanInfo) beanInfo;
                for (PersistenceContextReferenceInfo refInfo : statefulBeanInfo.jndiEnc.persistenceContextRefs) {
                    if (refInfo.extended) {
View Full Code Here

        Object altDD = ejbModule.getEjbModule().getAltDDs().get("openejb-jar.xml");
        if (!(altDD instanceof OpenejbJarType)) {
            return;
        }
        OpenejbJarType openejbJarType = (OpenejbJarType) altDD;
        EjbJarInfo ejbJarInfo = ejbModule.getEjbJarInfo();

        Map<String, MessageDrivenBeanInfo> mdbs = new TreeMap<String, MessageDrivenBeanInfo>();
        for (EnterpriseBeanInfo enterpriseBean : ejbJarInfo.enterpriseBeans) {
            if (enterpriseBean instanceof MessageDrivenBeanInfo) {
                mdbs.put(enterpriseBean.ejbName, (MessageDrivenBeanInfo) enterpriseBean);
View Full Code Here

        ejbModule.setRootEarContext(earContext);

        // build the config info tree
        // this method fills in the ejbJar jaxb tree based on the annotations
        // (metadata complete) and it run the openejb verifier
        EjbJarInfo ejbJarInfo;
        try {
            ejbJarInfo = openEjbSystem.configureApplication(ejbModule.getEjbModule());
            ejbModule.setEjbJarInfo(ejbJarInfo);
        } catch (OpenEJBException e) {
            e.printStackTrace();
View Full Code Here

        assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));

        // containers
        assembler.createContainer(config.configureService(StatefulSessionContainerInfo.class));

        EjbJarInfo ejbJar = config.configureApplication(buildTestApp());
        assertNotNull(ejbJar);
        assertEquals(1, ejbJar.enterpriseBeans.size());
        assertEquals(1, ejbJar.enterpriseBeans.get(0).aroundInvoke.size());
        assertEquals(1, ejbJar.enterpriseBeans.get(0).postConstruct.size());
View Full Code Here

        declared.add(new ContainerTransaction(TransAttribute.REQUIRES_NEW, "*", "Crimson", "remove"));
        declared.add(new ContainerTransaction(TransAttribute.REQUIRES_NEW, Color.class.getName(), "Scarlet", "*"));
        declared.add(new ContainerTransaction(TransAttribute.NEVER, Red.class.getName(), "Scarlet", "red"));
        declared.add(new ContainerTransaction(TransAttribute.REQUIRED, "Scarlet", Scarlet.class.getMethod("scarlet")));

        EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);
        assembler.createApplication(ejbJarInfo);

        InitialContext context = new InitialContext();

        {
View Full Code Here

                        return new TargetModuleIDImpl(DEFAULT_TARGET, clientInfo.moduleId);
                    }
                }
            }
            if (infoObject instanceof EjbJarInfo) {
                EjbJarInfo ejbJarInfo = (EjbJarInfo) infoObject;
                if (appInfo.jarPath.equals(ejbJarInfo.jarPath)) {
                    // are ejb modules allowed
                    if (allowedModuleType != null && !allowedModuleType.equals(ModuleType.EJB)) {
                        return null;
                    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.assembler.classic.EjbJarInfo

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.