use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class PropertiesProviderTest method config.
@Configuration
public Properties config() {
final Properties p = new Properties();
p.put("r1", "new://Resource?" + "class-name=org.apache.openejb.resource.PropertiesProviderTest$MyResource&" + "properties-provider=org.apache.openejb.resource.PropertiesProviderTest$PropertiesProvider");
p.put("r1.value", "will be overriden");
p.put("r1.noConflict", "ok");
p.put("r2", "new://Resource?" + "class-name=org.apache.openejb.resource.PropertiesProviderTest$MyResource");
p.put("r2.value", "r2");
p.put("r2.noConflict", "ok");
return p;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class MoviesTest method config.
@Configuration
public Properties config() throws Exception {
Properties p = new Properties();
p.put("movieDatabase", "new://Resource?type=DataSource");
p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
return p;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class AlternateDriverJarEmbeddedDemo method config.
@Configuration
public Properties config() {
final File drivers = new File(new File("target"), "drivers").getAbsoluteFile();
final Properties p = new Properties();
p.put("openejb.jdbc.datasource-creator", "dbcp-alternative");
File file = new File(drivers, "derby-10.10.1.1.jar");
Assert.assertTrue("Failed to find: " + file, file.exists());
p.put("JdbcOne", "new://Resource?type=DataSource&classpath=" + file.getAbsolutePath().replace("\\", "/"));
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");
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;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class BoneCPPooledDataSourceFromPoolTest method config.
@Configuration
public Properties config() {
final Properties p = new Properties();
p.put("openejb.jdbc.datasource-creator", "bonecp");
return p;
}
use of org.apache.openejb.testing.Configuration in project tomee by apache.
the class ZEjbdTest method configuration.
@Configuration
public Properties configuration() {
final Properties configuration = new Properties();
configuration.setProperty("ejbd.gzip", "true");
configuration.setProperty("openejb.client.connection.socket.read", "1000");
return configuration;
}
Aggregations