Package org.apache.openejb.jee

Examples of org.apache.openejb.jee.StatelessBean.addBusinessLocal()


        assembler.createContainer(statelessContainerInfo);

        // Setup the descriptor information

        StatelessBean bean = new StatelessBean(CounterBean.class);
        bean.addBusinessLocal(Counter.class.getName());

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

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


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

    @Module
    public StatelessBean app() throws Exception {

        final StatelessBean bean = new StatelessBean(WidgetBean.class);
        bean.addBusinessLocal(Widget.class.getName());
        bean.addBusinessRemote(RemoteWidget.class.getName());
        bean.addPostConstruct("init");
        bean.addPreDestroy("destroy");
        bean.setLocalBean(new EmptyType());
View Full Code Here

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

        assembler.createContainer(statelessContainerInfo);

        // Setup the descriptor information

        StatelessBean bean = new StatelessBean(WidgetBean.class);
        bean.addBusinessLocal(Widget.class.getName());
        bean.addBusinessRemote(RemoteWidget.class.getName());
        bean.setHomeAndRemote(WidgetHome.class, WidgetRemote.class);
        bean.addPostConstruct("init");
        bean.addPreDestroy("destroy");
View Full Code Here

        EjbJar ejbJar = new EjbJar();
        StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean(FooBean.class));
        bean.setHomeAndRemote(FooEJBHome.class, FooEJBObject.class);
        bean.setHomeAndLocal(FooEJBLocalHome.class, FooEJBLocalObject.class);
        bean.addBusinessLocal(FooLocal.class.getName());
        bean.addBusinessRemote(FooRemote.class.getName());

        try {
            Assembler assembler = new Assembler();
            ConfigurationFactory config = new ConfigurationFactory();
View Full Code Here

        EjbJar ejbJar = new EjbJar();
        StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean(FooBean.class));
        bean.setHomeAndLocal(interfaceClass, interfaceClass);
        bean.setHomeAndRemote(interfaceClass, interfaceClass);
        bean.addBusinessLocal(interfaceClass);
        bean.addBusinessRemote(interfaceClass);

        try {
            config.configureApplication(ejbJar);
            fail("A ValidationFailedException should have been thrown");
View Full Code Here

        ejbJar.addEnterpriseBean(new StatelessBean(EjbRefBean.class));

        StatelessBean fooBean = ejbJar.addEnterpriseBean(new StatelessBean(FooBean.class));
        fooBean.setHomeAndRemote(FooEJBHome.class, FooEJBObject.class);
        fooBean.setHomeAndLocal(FooEJBLocalHome.class, FooEJBLocalObject.class);
        fooBean.addBusinessLocal(FooLocal.class.getName());
        fooBean.addBusinessRemote(FooRemote.class.getName());

        StatelessBean fooImpl = ejbJar.addEnterpriseBean(new StatelessBean(FooImpl.class));
        fooImpl.setHomeAndRemote(FooEJBHome.class, FooEJBObject.class);
        fooImpl.setHomeAndLocal(FooEJBLocalHome.class, FooEJBLocalObject.class);
View Full Code Here

        fooBean.addBusinessRemote(FooRemote.class.getName());

        StatelessBean fooImpl = ejbJar.addEnterpriseBean(new StatelessBean(FooImpl.class));
        fooImpl.setHomeAndRemote(FooEJBHome.class, FooEJBObject.class);
        fooImpl.setHomeAndLocal(FooEJBLocalHome.class, FooEJBLocalObject.class);
        fooImpl.addBusinessLocal(FooLocal.class.getName());
        fooImpl.addBusinessRemote(FooRemote.class.getName());

        List<String> expectedKeys = new ArrayList<String>();
        expectedKeys.add("ann.ejb.ejbObject");
        expectedKeys.add("ann.ejb.ejbLocalObject");
View Full Code Here

        assembler.createContainer(statelessContainerInfo);

        // Setup the descriptor information

        final StatelessBean bean = new StatelessBean(WidgetBean.class);
        bean.addBusinessLocal(Widget.class.getName());
        bean.addBusinessRemote(RemoteWidget.class.getName());

        final EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(bean);
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.