use of org.apache.openejb.testing.Module in project tomee by apache.
the class CdiPasswordCipherTest method resources.
@Module
public Resources resources() {
final Resource resource = new Resource();
resource.setClassName(AResource.class.getName());
resource.setId("the");
resource.getProperties().setProperty("thePassword", "cipher:cdi:" + AdvancedAlgorithm.class.getName() + ":this");
final Resources resources = new Resources();
resources.getResource().add(resource);
return resources;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class ConnectorProxyNoNoArgConstructorTest method connector.
@Module
public Connector connector() {
final ConnectionDefinition connectionDefinition = new ConnectionDefinition();
connectionDefinition.setId("cf");
connectionDefinition.setConnectionImplClass(MyCon.class.getName());
connectionDefinition.setConnectionInterface(MyConAPI.class.getName());
connectionDefinition.setConnectionFactoryImplClass(MyMcf.class.getName());
connectionDefinition.setConnectionFactoryInterface(ConnectionFactory.class.getName());
connectionDefinition.setManagedConnectionFactoryClass(MyMcf.class.getName());
final OutboundResourceAdapter out = new OutboundResourceAdapter();
out.getConnectionDefinition().add(connectionDefinition);
final ResourceAdapter ra = new ResourceAdapter();
ra.setResourceAdapterClass(MyRa.class.getName());
ra.setOutboundResourceAdapter(out);
final Connector connector = new Connector();
connector.setVersion("1.7");
connector.setResourceAdapter(ra);
return connector;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class ConnectorProxyTest method connector.
@Module
public Connector connector() {
final ConnectionDefinition connectionDefinition = new ConnectionDefinition();
connectionDefinition.setId("cf");
connectionDefinition.setConnectionImplClass(MyCon.class.getName());
connectionDefinition.setConnectionInterface(MyConAPI.class.getName());
connectionDefinition.setConnectionFactoryImplClass(MyMcf.class.getName());
connectionDefinition.setConnectionFactoryInterface(ConnectionFactory.class.getName());
connectionDefinition.setManagedConnectionFactoryClass(MyMcf.class.getName());
final OutboundResourceAdapter out = new OutboundResourceAdapter();
out.getConnectionDefinition().add(connectionDefinition);
final ResourceAdapter ra = new ResourceAdapter();
ra.setResourceAdapterClass(MyRa.class.getName());
ra.setOutboundResourceAdapter(out);
final Connector connector = new Connector();
connector.setVersion("1.7");
connector.setResourceAdapter(ra);
return connector;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class EntitiesScanningPackageLimitedTest method persistence.
@Module
public Persistence persistence() {
final org.apache.openejb.jee.jpa.unit.PersistenceUnit unit = new org.apache.openejb.jee.jpa.unit.PersistenceUnit("jpa-global-dsdef-unit");
unit.setProperty("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
unit.getProperties().setProperty("openjpa.RuntimeUnenhancedClasses", "supported");
unit.getProperties().setProperty("openejb.jpa.auto-scan", "true");
unit.getProperties().setProperty("openejb.jpa.auto-scan.package", "com.doesnt.exist");
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 ParseAppCtxXmlTest method module.
@Module
public AppModule module() {
final AppModule app = new AppModule(ParseAppCtxXmlTest.class.getClassLoader(), "");
app.getAltDDs().put("app-ctx.xml", ParseAppCtxXmlTest.class.getClassLoader().getResource("complete-app-ctx.xml"));
app.getEjbModules().add(ejbModule("1"));
app.getEjbModules().iterator().next().getEjbJar().addEnterpriseBean(new SingletonBean("CalculatorBean", CalculatorConfigured.class.getName()));
app.getEjbModules().add(ejbModule("2"));
app.getEjbModules().get(1).getEjbJar().addEnterpriseBean(new SingletonBean("BeanInAModule", CalculatorConfigured2.class.getName()));
return app;
}
Aggregations