use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class StatefulStatefulTimeoutTest method properties.
@Configuration
public Properties properties() {
final Properties properties = new Properties();
properties.setProperty("Default Stateful Container.Frequency", "1seconds");
return properties;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class CipheredPasswordDataSourceTest method config.
@Configuration
public Properties config() {
final Properties p = new Properties();
p.put("openejb.jdbc.datasource-creator", "dbcp");
p.put("managed", "new://Resource?type=DataSource");
p.put("managed.JdbcDriver", FakeDriver.class.getName());
p.put("managed.JdbcUrl", URL);
p.put("managed.UserName", USER);
p.put("managed.Password", ENCRYPTED_PASSWORD);
p.put("managed.PasswordCipher", EmptyPasswordCipher.class.getName());
p.put("managed.JtaManaged", "true");
p.put("managed.initialSize", "10");
p.put("managed.maxActive", "10");
p.put("managed.maxIdle", "10");
p.put("managed.minIdle", "10");
p.put("managed.maxWait", "200");
p.put("managed.defaultAutoCommit", "false");
p.put("managed.defaultReadOnly", "false");
p.put("managed.testOnBorrow", "true");
p.put("managed.testOnReturn", "true");
p.put("managed.testWhileIdle", "true");
return p;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class MultiThreadedManagedDataSourceTest method config.
@Configuration
public Properties config() {
final Properties p = new Properties();
p.put("openejb.jdbc.datasource-creator", "dbcp-alternative");
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;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class XADataSourceIsDifferentTest method config.
@Configuration
public Properties config() {
final File file = new File("target/test/xa/howl");
if (file.isDirectory()) {
Files.delete(file);
}
final Properties p = new Properties();
// default dbcp pool supports xaDataSource config, not our proxy layer
p.put(DataSourceCreator.class.getName(), DbcpDataSourceCreator.class.getName());
p.put("txMgr", "new://TransactionManager?type=TransactionManager");
p.put("txMgr.txRecovery", "true");
p.put("txMgr.logFileDir", "target/test/xa/howl");
p.put("xa", "new://Resource?class-name=" + JDBCXADataSource.class.getName());
p.put("xa.url", "jdbc:hsqldb:mem:xa");
p.put("xa.user", "sa");
p.put("xa.password", "");
// conflict with connectionProperties
p.put("xa.SkipImplicitAttributes", "true");
p.put("xaFacade", "new://Resource?class-name=" + IsDifferentXaDataSourceWrapper.class.getName() + "&constructor=delegate");
p.put("xaFacade.delegate", "@xa");
return p;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class AlternateDriverJarTest method config.
@Configuration
public Properties config() {
final File drivers = new File(jarLocation(AlternateDriverJarTest.class).getParentFile(), "drivers").getAbsoluteFile();
final Properties p = new Properties();
p.put("openejb.jdbc.datasource-creator", "dbcp-alternative");
p.put("JdbcOne", "new://Resource?type=DataSource&classpath=mvn:org.apache.derby:derby:10.10.1.1");
p.put("JdbcOne.JdbcDriver", "org.apache.derby.jdbc.EmbeddedDriver");
p.put("JdbcOne.JdbcUrl", "jdbc:derby:memory:JdbcOne;create=true");
p.put("JdbcOne.UserName", USER);
p.put("JdbcOne.Password", PASSWORD);
p.put("JdbcOne.JtaManaged", "false");
final File file = new File(drivers, "derby-10.9.1.0.jar");
Assert.assertTrue("Failed to find: " + file, file.exists());
p.put("JdbcTwo", "new://Resource?type=DataSource&classpath=" + file.getAbsolutePath().replace("\\", "/"));
p.put("JdbcTwo.JdbcDriver", "org.apache.derby.jdbc.EmbeddedDriver");
p.put("JdbcTwo.JdbcUrl", "jdbc:derby:memory:JdbcTwo;create=true");
p.put("JdbcTwo.UserName", USER);
p.put("JdbcTwo.Password", PASSWORD);
p.put("JdbcTwo.JtaManaged", "false");
return p;
}
Aggregations