use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class BeanValidationCustomProviderTest method app.
@Module
public StatelessBean app() throws Exception {
final StatelessBean bean = new StatelessBean(ABean.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class AbstractInjectionTest method app.
@Module
public EjbModule app() throws Exception {
final StatelessBean bean = new StatelessBean(AppJpaDAO.class);
bean.setLocalBean(new Empty());
final StatelessBean test = new StatelessBean(AppCDI.class);
bean.setLocalBean(new Empty());
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(bean);
ejbJar.addEnterpriseBean(test);
final Beans beans = new Beans();
beans.addManagedClass(PlcBaseDAO.class);
beans.addManagedClass(PlcBaseJpaDAO.class);
beans.addManagedClass(AppCDI.class);
beans.addManagedClass(AppJpaDAO.class);
final EjbModule jar = new EjbModule(ejbJar);
jar.setBeans(beans);
return jar;
}
use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class SimpleCdiTest method setUp.
@Before
public void setUp() throws Exception {
final ConfigurationFactory config = new ConfigurationFactory();
final Assembler assembler = new Assembler();
assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
assembler.createSecurityService(config.configureService(SecurityServiceInfo.class));
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatelessBean(Echo.class));
final Beans beans = new Beans();
beans.addInterceptor(EchoInterceptor.class);
beans.addDecorator(EchoDecorator.class);
beans.addManagedClass(SimpleModel.class);
beans.addManagedClass(ProducesEjbInjector.class);
final EjbModule module = new EjbModule(ejbJar);
module.setBeans(beans);
assembler.createApplication(config.configureApplication(module));
final Properties properties = new Properties(System.getProperties());
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, InitContextFactory.class.getName());
ctx = new InitialContext(properties);
}
use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class BeanValidationTest 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.jee.StatelessBean in project tomee by apache.
the class AbstractCDIInjectionTest method app.
@Module
public EjbModule app() throws Exception {
final StatelessBean bean = new StatelessBean(AppJpaDAO.class);
bean.setLocalBean(new Empty());
final StatelessBean test = new StatelessBean(AppCDI.class);
bean.setLocalBean(new Empty());
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(bean);
ejbJar.addEnterpriseBean(test);
final Beans beans = new Beans();
beans.addManagedClass(PlcBaseDAO.class);
beans.addManagedClass(PlcBaseJpaDAO.class);
final EjbModule jar = new EjbModule(ejbJar);
jar.setBeans(beans);
return jar;
}
Aggregations