Package org.apache.openejb.config

Examples of org.apache.openejb.config.ConfigurationFactory.configureApplication()


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

        ejbJar.getAssemblyDescriptor().addInterceptorBinding(new InterceptorBinding("*", AttributeInterceptor.class.getName()));

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

        loadAttributes(ejbJarInfo, "Color");

        assertAttribute("Never", Color.class.getMethod("color"));
View Full Code Here


                    AppModule app = new AppModule(this.getClass().getClassLoader(), "test");
                    app.getEjbModules().add(module(expected));
                    app.getEjbModules().add(module(actual));

                    AppInfo appInfo = factory.configureApplication(app);

                    List<ContainerTransaction> expectedList = expected.getAssemblyDescriptor().getContainerTransaction();
                    List<ContainerTransaction> actualList = actual.getAssemblyDescriptor().getContainerTransaction();

                    assertEquals(expectedList.size(), actualList.size());
View Full Code Here

        bean.setLocalBean(new Empty());

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

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

    }

    private static String join(String delimeter, List items) {
        StringBuffer sb = new StringBuffer();
View Full Code Here

        // Setup the descriptor information

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new SingletonBean(MySingleton.class));

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

    public void testSuccess() throws Exception {
        Context context = new InitialContext();
View Full Code Here

        statefulContainerInfo.properties.setProperty("PoolSize", "0");
        statefulContainerInfo.properties.setProperty("BulkPassivate", "1");
        statefulContainerInfo.properties.setProperty("Frequency", "0");
        assembler.createContainer(statefulContainerInfo);

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

        StatefulSessionBeanTest.calls.clear();

        InitialContext ctx = new InitialContext();
        TargetHome home = (TargetHome) ctx.lookup("TargetBeanRemoteHome");
View Full Code Here

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

        EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new ManagedBean(MyBean.class));

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

    public void test() throws Exception {
        MyBean.instances.set(0);
       
View Full Code Here

        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

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

        Context context = new InitialContext(properties);
View Full Code Here

        transactions.add(new ContainerTransaction(TransAttribute.SUPPORTS, null, "MyCmpBean", "*"));
        transactions.add(new ContainerTransaction(TransAttribute.SUPPORTS, null, "MySingletonBean", "*"));

        AppModule module = new AppModule(this.getClass().getClassLoader(), "test");
        module.getEjbModules().add(new EjbModule(ejbJar));
        assembler.createApplication(config.configureApplication(module));

    }

    @LocalHome(MyLocalHome.class)
    @RemoteHome(MyRemoteHome.class)
View Full Code Here

        final EjbJar ejbJar = new EjbJar();
        ejbJar.addEnterpriseBean(new StatefulBean("Stateful", MySessionBean.class));
        ejbJar.addEnterpriseBean(new StatelessBean("Stateless", MySessionBean.class));
        ejbJar.addEnterpriseBean(new SingletonBean("Singleton", MySessionBean.class));

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

        final Properties properties = new Properties();
        properties.put(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName());
        final InitialContext context = new InitialContext(properties);
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.