use of org.apache.openejb.testing.Module in project tomee by apache.
the class AppComposerAsJUnitRuleTest method persistence.
@Module
public Persistence persistence() {
final PersistenceUnit unit = new PersistenceUnit("foo-unit");
unit.addClass(EntityToValidate.class);
unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
unit.getProperties().setProperty("openjpa.RuntimeUnenhancedClasses", "supported");
unit.setExcludeUnlistedClasses(true);
final Persistence persistence = new Persistence(unit);
persistence.setVersion("2.0");
return persistence;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class DataSourceInitialSizeAdjustingTest method persistence.
@Module
public Persistence persistence() throws Exception {
final PersistenceUnit unit = new PersistenceUnit("foo-unit");
unit.setJtaDataSource("DataSourceInitialSizeAdjustingTest");
return new Persistence(unit);
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class ResourceLocalEmInjectionTest method app.
@Module
public StatelessBean app() throws Exception {
final StatelessBean bean = new StatelessBean(PersistManager.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class AliasesTest method persistence1.
@Module
public Persistence persistence1() throws Exception {
final PersistenceUnit unit = new PersistenceUnit("AliasesTest-unit-1");
unit.setJtaDataSource("aliased-1");
return new Persistence(unit);
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class AliasesTest method persistence0.
@Module
public Persistence persistence0() throws Exception {
final PersistenceUnit unit = new PersistenceUnit("AliasesTest-unit-0");
unit.setJtaDataSource("aliased-2");
return new Persistence(unit);
}
Aggregations