Package org.apache.openejb.testng

Examples of org.apache.openejb.testng.PropertiesBuilder


@RunWith(ApplicationComposer.class)
public class URLAsResourceTest {
    @Configuration
    public Properties config() {
        return new PropertiesBuilder()
            .p("url", "new://Resource?class-name=java.net.URL&constructor=value")
            .p("url.value", "http://tomee.apache.org")
            .build();
    }
View Full Code Here


@RunWith(ApplicationComposer.class)
public class TimersOffTest {
    @Configuration
    public Properties config() {
        return new PropertiesBuilder().p("openejb.timers.on", "false").build();
    }
View Full Code Here

    @Module
    public AppModule application() {
        final EjbModule ejbModule = new EjbModule(new EjbJar());
        ejbModule.getEjbJar().addEnterpriseBean(new SingletonBean(MyTimedEjb.class).localBean());

        final Properties quartzConfig = new PropertiesBuilder()
            .p("org.apache.openejb.quartz.scheduler.instanceName", "TestScheduler")
            .p("org.apache.openejb.quartz.scheduler.instanceId", "AUTO")
            .p("org.apache.openejb.quartz.threadPool.class", SimpleThreadPool.class.getName())
            .p("org.apache.openejb.quartz.threadPool.threadCount", "4")
            .p("org.apache.openejb.quartz.threadPool.threadPriority", "5")
View Full Code Here

        return appModule;
    }

    @Configuration
    public Properties configuration() {
        return new PropertiesBuilder()
            // see src/test/resources/import-QuartzPersistenceForEJBTimersDB.sql for the init script
            .p("QuartzPersistenceForEJBTimersDB", "new://Resource?type=DataSource")
            .p("QuartzPersistenceForEJBTimersDB.JtaManaged", "true")
            .p("QuartzPersistenceForEJBTimersDB.JdbcUrl", "jdbc:hsqldb:mem:QuartzPersistenceForEJBTimersDB")
            .p("QuartzPersistenceForEJBTimersDB.UserName", "SA")
View Full Code Here

        }
    }

    @Configuration
    public Properties configuration() {
        return datasource(datasource(new PropertiesBuilder(), "fo1"), "fo2")

            .property("router", "new://Resource?class-name=" + FailOverRouter.class.getName())
            .property("router.datasourceNames", "fo1,fo2")
            .property("router.strategy", "reverse")
View Full Code Here

        assertTrue(found);
    }

    @Configuration
    public Properties configuration() {
        return new PropertiesBuilder()
            .p("raw", "new://Resource?class-name=" + MyDataSourceFactory.class.getName() + "&factory-name=create")

            .p("jta", "new://Resource?type=DataSource&class-name=org.apache.openejb.resource.jdbc.managed.JTADataSourceWrapperFactory&factory-name=create")
            .p("jta.delegate", "raw")
            .build();
View Full Code Here

        assertNotSame(newDelegate, delegate);
    }

    @Configuration
    public Properties configuration() {
        return new PropertiesBuilder()
            .p("ds", "new://Resource?type=DataSource")
            .p("ds.flushable", "true")
            .p("ds.jtaManaged", "false")
            .build();
    }
View Full Code Here

        }
    }

    @Configuration
    public Properties configuration() {
        return datasource(datasource(new PropertiesBuilder(), "fo1"), "fo2")
            .property("fo1.JtaManaged", "true")
            .property("fo2.JtaManaged", "true")
            .property("router", "new://Resource?class-name=" + FailOverRouter.class.getName())
            .property("router.datasourceNames", "fo1,fo2")
            .property("router.strategy", "reverse")
View Full Code Here

        port = NetworkUtil.getNextAvailablePort();
    }

    @Configuration
    public Properties props() {
        return new PropertiesBuilder().p("httpejbd.port", Integer.toString(port)).build();
    }
View Full Code Here

public class MeetingPlannerTest {
    private static final int JAX_WS_PORT = NetworkUtil.getNextAvailablePort();

    @Configuration
    public Properties configuration() {
        return new PropertiesBuilder().p("httpejbd.port", Integer.toString(JAX_WS_PORT)).build();
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.testng.PropertiesBuilder

Copyright © 2018 www.massapicom. 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.