Examples of StatelessBean


Examples of org.apache.openejb.jee.StatelessBean

        final EjbModule module = new EjbModule(new EjbJar("openejb"), new OpenejbJar());

        final OpenejbJar openejbJar = module.getOpenejbJar();
        final EjbJar ejbJar = module.getEjbJar();

        ejbJar.addEnterpriseBean(new StatelessBean(null, DeployerEjb.class));
        ejbJar.addEnterpriseBean(new StatelessBean(null, ConfigurationInfoEjb.class));
        ejbJar.addEnterpriseBean(new StatelessBean(null, MEJBBean.class));

        final String className = "org.apache.tomee.catalina.deployer.WebappDeployer";
        if (exists(className)) {
            final StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean("openejb/WebappDeployer", className));
            final EjbDeployment deployment = openejbJar.addEjbDeployment(bean);
            deployment.getProperties().put("openejb.jndiname.format", "{deploymentId}{interfaceType.annotationName}");
        }

View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

        statelessContainerInfo.properties.setProperty("StrictPooling", "true");
        assembler.createContainer(statelessContainerInfo);

        // Setup the descriptor information

        StatelessBean bean = new StatelessBean(CounterBean.class);
        bean.addBusinessLocal(Counter.class.getName());
        bean.addBusinessRemote(RemoteCounter.class.getName());
        bean.addPostConstruct("init");
        bean.addPreDestroy("destroy");

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(bean);

        CounterBean.instances.set(0);
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

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

        webModule = annotationDeployer.deploy(webModule);

        EjbJar ejbJar = new EjbJar("ejb");
        ejbJar.addEnterpriseBean(new StatelessBean(SimpleEJB.class));

        ConfigurationFactory factory = new ConfigurationFactory(false);

        AppModule appModule = new AppModule(Thread.currentThread().getContextClassLoader(), "foo");
        appModule.setModuleId("rest");
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

        // Setup the descriptor information
        CounterBean.instances.set(0);

        EjbJar ejbJar = new EjbJar("StatsModule");
        ejbJar.addEnterpriseBean(new StatelessBean(CounterBean.class));

        assembler.createApplication(config.configureApplication(ejbJar));

        javax.naming.Context context = new InitialContext();
        CounterBean bean = (CounterBean) context.lookup("CounterBeanLocalBean");
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

        // Setup the descriptor information
        CounterBean.instances.set(0);

        EjbJar ejbJar = new EjbJar("StatsInvocModule");
        ejbJar.addEnterpriseBean(new StatelessBean(CounterBean.class));


        assembler.createApplication(config.configureApplication(ejbJar));

        javax.naming.Context context = new InitialContext();
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

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

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new StatelessBean(FooBean.class));
        assembler.createApplication(config.configureApplication(ejbJar));

        Context context = new InitialContext();

        assertOpenejbUrlLookups(context);
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

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

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new StatelessBean(FooBean.class));
        assembler.createApplication(config.configureApplication(ejbJar));
       
        Properties properties = new Properties();
        properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName());
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

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

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new StatelessBean(GreenBean.class));
        ejbJar.addEnterpriseBean(new StatelessBean(RedBean.class));

        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"));
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

        statelessContainerInfo.properties.putAll(properties);

        assembler.createContainer(statelessContainerInfo);

        final EjbJar ejbJar = new EjbJar(moduleId);
        ejbJar.addEnterpriseBean(new StatelessBean(CounterBean.class));
        assembler.createApplication(config.configureApplication(ejbJar));

        final javax.naming.Context context = new InitialContext();
        return (CounterBean) context.lookup("CounterBeanLocalBean");
    }
View Full Code Here

Examples of org.apache.openejb.jee.StatelessBean

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

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