use of org.apache.openejb.testing.Module in project tomee by apache.
the class LocalReferenceSerializationTest method app.
@Module
public EjbJar app() {
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatelessBean(OrangeLocalBean.class));
ejbJar.addEnterpriseBean(new StatelessBean(RedBean.class));
ejbJar.addEnterpriseBean(new StatelessBean(GreenBean.class));
return ejbJar;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class PassivationWithEmTest method bean.
@Module
public EjbJar bean() {
final EjbJar ejbJar = new EjbJar(getClass().getSimpleName());
ejbJar.addEnterpriseBean(new StatefulBean("PassivationWithEm", PassivationWithEm.class));
ejbJar.addEnterpriseBean(new StatefulBean("PassivationWithEmExtended", PassivationWithEmExtended.class));
return ejbJar;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class InterfaceTransactionTest method module.
@Module
public EjbJar module() throws Exception {
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatelessBean(OrangeBean.class));
final Method remoteMethod = new Method("OrangeBean", "isInTransaction").withInterface(MethodIntf.REMOTE);
final Method localMethod = new Method("OrangeBean", "isInTransaction").withInterface(MethodIntf.LOCAL);
final List<ContainerTransaction> transactions = ejbJar.getAssemblyDescriptor().getContainerTransaction();
transactions.add(new ContainerTransaction(TransAttribute.REQUIRED, remoteMethod));
transactions.add(new ContainerTransaction(TransAttribute.SUPPORTS, localMethod));
return ejbJar;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class StatelessContainerTest method app.
@Module
public StatelessBean app() throws Exception {
final StatelessBean bean = new StatelessBean(WidgetBean.class);
bean.addBusinessLocal(Widget.class.getName());
bean.addBusinessRemote(RemoteWidget.class.getName());
bean.addPostConstruct("init");
bean.addPreDestroy("destroy");
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class EjbTimerImplSerializableTest method bean.
@Module
public StatelessBean bean() {
final StatelessBean bean = new StatelessBean(EJBWithTimer.class);
bean.setLocalBean(new Empty());
return bean;
}
Aggregations