use of org.apache.openejb.jee.jpa.unit.PersistenceUnit 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.jee.jpa.unit.PersistenceUnit 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);
}
use of org.apache.openejb.jee.jpa.unit.PersistenceUnit in project tomee by apache.
the class MoviesTest method persistence.
@Module
public PersistenceUnit persistence() {
PersistenceUnit unit = new PersistenceUnit("movie-unit");
unit.setJtaDataSource("movieDatabase");
unit.setNonJtaDataSource("movieDatabaseUnmanaged");
unit.getClazz().add(Movie.class.getName());
unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
return unit;
}
Aggregations