Search in sources :

Example 21 with Configuration

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

the class ImportSqlScriptTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("ImportSqlScriptTestDb", "new://Resource?type=DataSource");
    p.put("ImportSqlScriptTestDb.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("ImportSqlScriptTestDb.JdbcUrl", "jdbc:hsqldb:mem:import-sql");
    // p.put("ImportSqlScriptTest.initConnectionSqls", "insert into \"ImportSqlScriptTest$Something\" (id) values(1);");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 22 with Configuration

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

the class BoneCPPooledDataSourceTest method config.

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

Example 23 with Configuration

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

the class TomcatDataSourceFromPoolTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("openejb.jdbc.datasource-creator", "tomcat");
    return p;
}
Also used : Properties(java.util.Properties) Configuration(org.apache.openejb.testing.Configuration)

Example 24 with Configuration

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

the class TomcatPoolCipherPasswordTest method config.

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

Example 25 with Configuration

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

the class PassivationWithEmTest method config.

@Configuration
public Properties config() {
    final Properties p = new Properties();
    p.put("PassivationWithEm Stateful Container", "new://Container?type=STATEFUL");
    p.put("PassivationWithEm Stateful Container.TimeOut", "1 seconds");
    p.put("PassivationWithEm Stateful Container.Capacity", "1");
    p.put("PassivationWithEm Stateful Container.Frequency", "0");
    p.put("PassivationWithEm", "new://Resource?type=DataSource");
    p.put("PassivationWithEm.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("PassivationWithEm.JdbcUrl", "jdbc:hsqldb:mem:pwe");
    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