use of org.apache.openejb.testing.Module in project tomee by apache.
the class SessionScoped2Test method getBeans.
@Module
public Beans getBeans() {
final Beans beans = new Beans();
beans.addManagedClass(Orange.class);
beans.addManagedClass(Blue.class);
beans.addManagedClass(Green.class);
return beans;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class StatefulDecoratorInjectionTest method getBeans.
@Module
public Beans getBeans() {
final Beans beans = new Beans();
beans.addDecorator(OrangeSecurity.class);
return beans;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class LocalBeanProxySerializationTest method app.
@Module
public StatelessBean app() {
final StatelessBean bean = new StatelessBean(SampleLocalBean.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class ResourcePropertyLeakTest method application.
@Module
public AppModule application() {
final EjbModule ejbModule = new EjbModule(new EjbJar());
final AppModule appModule = new AppModule(Thread.currentThread().getContextClassLoader(), null);
appModule.getEjbModules().add(ejbModule);
return appModule;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class DescriptorDataSourceDefinitionTest method application.
@Module
public EjbJar application() throws Exception {
final EjbJar ejbJar = new EjbJar();
final SingletonBean orange = ejbJar.addEnterpriseBean(new SingletonBean(OrangeBean.class));
orange.getDataSource().add(new org.apache.openejb.jee.DataSource().name("java:comp/env/superDS").className("org.hsqldb.jdbc.JDBCDataSource").user("sa").password("").url("jdbc:hsqldb:mem:superDS"));
orange.getResourceRef().add(new ResourceRef().lookup("java:comp/env/superDS").injectionTarget(OrangeBean.class, "ds"));
final StatelessBean yellow = ejbJar.addEnterpriseBean(new StatelessBean(YellowBean.class));
yellow.getDataSource().add(new org.apache.openejb.jee.DataSource().name("java:comp/env/superMegaDS").className("org.hsqldb.jdbc.JDBCDataSource").user("sa").password("").url("jdbc:hsqldb:mem:superDS"));
yellow.getResourceRef().add(new ResourceRef().lookup("java:comp/env/superMegaDS").injectionTarget(YellowBean.class, "mega"));
yellow.getDataSource().add(new org.apache.openejb.jee.DataSource().name("java:comp/env/superGigaDS").className("org.hsqldb.jdbc.JDBCDataSource").user("sa").password("").url("jdbc:hsqldb:mem:superDS"));
yellow.getResourceRef().add(new ResourceRef().lookup("java:comp/env/superGigaDS").injectionTarget(YellowBean.class, "giga"));
return ejbJar;
}
Aggregations