Examples of EjbJarInfo


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

        EjbModule ejbModule = new EjbModule(ejbJar, new OpenejbJar());

        ejbModule.getOpenejbJar().addEjbDeployment(new EjbDeployment(null, "foo/bar/baz/Green", "GreenBean"));
        ejbModule.getOpenejbJar().addEjbDeployment(new EjbDeployment(null, "foo/bar/baz/Red", "RedBean"));

        EjbJarInfo info = config.configureApplication(ejbModule);
        assembler.createApplication(info);

        InitialContext initialContext = new InitialContext();
        Color green = (Color) initialContext.lookup("foo/bar/baz/GreenLocal");
        Color red = (Color) initialContext.lookup("foo/bar/baz/RedLocal");
View Full Code Here

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

        EjbJar ejbJar = new EjbJar("SecurityTest");

        ejbJar.addEnterpriseBean(new StatelessBean(FooBean.class));
        ejbJar.addEnterpriseBean(new StatelessBean(BarBean.class));

        EjbJarInfo ejbJarInfo = config.configureApplication(ejbJar);

        assembler.createApplication(ejbJarInfo);

        return assembler;
    }
View Full Code Here

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

        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

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

        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

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

    }

    public void initContext(EARContext earContext, Module module, ClassLoader classLoader) throws DeploymentException {
        EjbModule ejbModule = (EjbModule) module;
        ejbModule.setClassLoader(classLoader);
        EjbJarInfo ejbJarInfo = getEjbJarInfo(earContext, ejbModule, classLoader);


        ejbModule.setEjbJarInfo(ejbJarInfo);

        // update the original spec dd with the metadata complete dd
View Full Code Here

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

                addGeronimmoOpenEJBPersistenceUnit(ejbModule);
            }
        }

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

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

        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

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

      //We build our own because we can't trust anyone to get the classpath right otherwise!
      ejbModule.setFinder(new OSGiFinder(bundle));
     
      ConfigurationFactory configurationFactory = new ConfigurationFactory();
     
      EjbJarInfo ejbInfo = null;
      //Avoid yet another ClassLoading problem
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      try {
        Thread.currentThread().setContextClassLoader(new ClassLoader(OpenEjbVersion.class.getClassLoader()) {
          protected Class<?> findClass(String name) throws ClassNotFoundException {
View Full Code Here

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

            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

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

        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
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.