Examples of configureApplication()


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

        bean.addPreDestroy("destroy");

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

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

        WidgetBean.lifecycle.clear();
    }

    private static String join(String delimeter, List items) {
View Full Code Here

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

        StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean(WidgetBean.class));
        bean.getEnvEntry().add(new EnvEntry("count", Integer.class.getName(), "10"));


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

    }

    public static interface Foo {}
View Full Code Here

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

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

        Properties props = new Properties();
        props.setProperty(Context.SECURITY_PRINCIPAL, "jonathan");
View Full Code Here

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

        ejbJar.addEnterpriseBean(new SingletonBean(One.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Four.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Three.class));

        // startup and trigger @PostConstruct
        assembler.createApplication(config.configureApplication(ejbJar));

        assertEquals(expected(four, three, two, one), actual);

        actual.clear();
View Full Code Here

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

        ejbJar.addEnterpriseBean(new SingletonBean(Two.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Three.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Four.class)).setDependsOn("Five");

        try {
            config.configureApplication(ejbJar);
            fail("Validation should have found a circular reference");
        } catch (ValidationFailedException e) {
            ValidationFailure[] failures = e.getFailures();
            assertEquals(1, failures.length);
            assertEquals("dependsOn.noSuchEjb", failures[0].getMessageKey());
View Full Code Here

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

        ejbJar.addEnterpriseBean(new SingletonBean(Two.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Three.class));
        ejbJar.addEnterpriseBean(new SingletonBean(Four.class)).setDependsOn("One");

        try {
            config.configureApplication(ejbJar);
            fail("Validation should have found a circular reference");
        } catch (ValidationFailedException e) {
            ValidationFailure[] failures = e.getFailures();
            assertEquals(1, failures.length);
            assertEquals("dependsOn.circuit", failures[0].getMessageKey());
View Full Code Here

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

        bean.addPreDestroy("destroy");

        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

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

        try {
            addContainerInfos(configuration, openEjbConfiguration.containerSystem, configurationFactory);
            addResourceAdapterMDBInfos(configuration, openEjbConfiguration.containerSystem, configurationFactory);
            //process resource adapters

            return configurationFactory.configureApplication(appModule);
        } finally {
            Thread.currentThread().setContextClassLoader(oldClassLoader);
        }
    }
View Full Code Here

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

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

        CounterBean.instances.set(0);
        assembler.createApplication(config.configureApplication(ejbJar));

        Properties props = new Properties();
        props.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory");
        props.put("java.naming.provider.url", "ejbd://127.0.0.1:" + port);
        Context context = new InitialContext(props);
View Full Code Here

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

        appModule.setModuleId("rest");
        appModule.getWebModules().add(webModule);
        appModule.getEjbModules().add(new EjbModule(ejbJar));
        annotationDeployer.deploy(appModule);

        AppInfo appInfo = factory.configureApplication(appModule);
        final AppContext application = assembler.createApplication(appInfo);

        Context ctx = (Context) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class<?>[]{Context.class}, new InvocationHandler() {
            @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
                if (args.length == 1 && args[0].equals("SimpleEJBLocalBean")) {
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.