Search in sources :

Example 1 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class TomcatPoolTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("openejb.jdbc.datasource-creator", TomEEDataSourceCreator.class.getName());
    p.put("managed", "new://Resource?type=DataSource");
    p.put("managed.DriverClassName", "org.hsqldb.jdbcDriver");
    p.put("managed.Url", URL);
    p.put("managed.UserName", USER);
    p.put("managed.Password", PASSWORD);
    p.put("managed.JtaManaged", "true");
    p.put("managed.JdbcInterceptors", "StatementCache(prepared=true)");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 2 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class StatefulJPATest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.setProperty("StatefulJPATest", "new://Resource?type=DataSource");
    p.setProperty("StatefulJPATest.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.setProperty("StatefulJPATest.JdbcUrl", "jdbc:hsqldb:mem:stateful-jpa");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 3 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class StatelessContainerTest method config.

@Configuration
public Properties config() {
    final Properties properties = new Properties();
    properties.put("statelessContainer", "new://Container?type=STATELESS");
    properties.put("statelessContainer.TimeOut", "10");
    properties.put("statelessContainer.MaxSize", "0");
    properties.put("statelessContainer.StrictPooling", "false");
    return properties;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 4 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class CustomPoolDataSourceTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("managed", "new://Resource?type=DataSource");
    p.put("managed.DataSourceCreator", CustomCreator.class.getName());
    p.put("managed.JtaManaged", "false");
    p.put("managed.Name", "custom");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 5 with Configuration

use of org.apache.openejb.testing.Configuration in project tomee by apache.

the class JBossLikeDataSourceInjectionTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("openejb.log.async", "false");
    // to potential fail auto adjusting
    p.put("noise", "new://Resource?type=DataSource");
    p.put("java:/jdbc/DefaultDS", "new://Resource?type=DataSource");
    p.put("java:/jdbc/DefaultDS.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("java:/jdbc/DefaultDS.JdbcUrl", URL);
    p.put("java:/jdbc/DefaultDS.UserName", "sa");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Aggregations

Configuration (org.apache.openejb.testing.Configuration)44 Properties (java.util.Properties)43 File (java.io.File)5 DbcpDataSourceCreator (org.apache.openejb.resource.jdbc.dbcp.DbcpDataSourceCreator)2 DataSourceCreator (org.apache.openejb.resource.jdbc.pool.DataSourceCreator)2 Path (java.nio.file.Path)1 PropertiesResourceProvider (org.apache.openejb.api.resource.PropertiesResourceProvider)1 OpenEjbConfiguration (org.apache.openejb.assembler.classic.OpenEjbConfiguration)1 IsDifferentXaDataSourceWrapper (org.apache.openejb.resource.jdbc.xa.IsDifferentXaDataSourceWrapper)1 PropertiesBuilder (org.apache.openejb.testng.PropertiesBuilder)1 org.hsqldb.jdbcDriver (org.hsqldb.jdbcDriver)1