use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class ManagedDataSourceIsClosedTest 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 ManagedDataSourceTest 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 UTManagedDataSourceTest 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 XADataSourceTest method config.
@Configuration
public java.util.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");
// real XA datasources
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("xa2", "new://Resource?class-name=" + JDBCXADataSource.class.getName());
p.put("xa2.url", "jdbc:hsqldb:mem:xa2");
p.put("xa2.user", "sa");
p.put("xa2.password", "");
p.put("xa2.SkipImplicitAttributes", "true");
// pooled "XA" datasources
p.put("xadb", "new://Resource?type=DataSource");
// to be xa
p.put("xadb.XaDataSource", "xa");
p.put("xadb.JtaManaged", "true");
p.put("xadb2", "new://Resource?type=DataSource");
// to be xa
p.put("xadb2.XaDataSource", "xa2");
p.put("xadb2.JtaManaged", "true");
// non jta datasources
p.put("xadbn", "new://Resource?class-name=" + JDBCXADataSource.class.getName());
p.put("xadbn.JdbcDriver", jdbcDriver.class.getName());
p.put("xadbn.url", "jdbc:hsqldb:mem:xa");
p.put("xadbn.user", "sa");
p.put("xadbn.password", "");
p.put("xadbn2", "new://Resource?type=DataSource");
p.put("xadbn2.JdbcDriver", jdbcDriver.class.getName());
p.put("xadbn2.JdbcUrl", "jdbc:hsqldb:mem:xa2");
p.put("xadbn2.UserName", "sa");
p.put("xadbn2.Password", "");
p.put("xadbn2.JtaManaged", "false");
return p;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class DynamicEJBImplTest method config.
@Configuration
public Properties config() {
final Properties p = new Properties();
p.put("dynamicEjbDatabase", "new://Resource?type=DataSource");
p.put("dynamicEjbDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
p.put("dynamicEjbDatabase.JdbcUrl", "jdbc:hsqldb:mem:bval");
return p;
}
Aggregations