use of org.apache.openejb.testing.Module in project tomee by apache.
the class FeatureTest method app.
@Module
public EjbModule app() {
final StatelessBean bean = (StatelessBean) new StatelessBean(MySecondRestClass.class).localBean();
bean.setRestService(true);
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(bean);
final OpenejbJar openejbJar = new OpenejbJar();
final PojoDeployment e = new PojoDeployment();
openejbJar.getPojoDeployment().add(e);
e.setClassName("jaxrs-application");
final Properties properties = e.getProperties();
properties.setProperty(CxfRsHttpListener.CXF_JAXRS_PREFIX + CxfUtil.FEATURES, "my-feature");
final EjbModule module = new EjbModule(ejbJar);
module.setOpenejbJar(openejbJar);
final Resources resources = new Resources();
final Service feature = new Service("my-feature", null);
feature.setClassName(MyFeature.class.getName());
resources.getService().add(feature);
module.initResources(resources);
return module;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class RsInjectionTest method service.
@Module
public static SingletonBean service() throws Exception {
final SingletonBean bean = new SingletonBean(RsInjection.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class RsInterceptorInjectionTest method service.
@Module
public static SingletonBean service() throws Exception {
final SingletonBean bean = new SingletonBean(RsInjection.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class SimplePojoTest method war.
@Module
@Classes(cdi = true, value = { MyFirstRestClass.class })
public WebModule war() {
final WebModule webModule = new WebModule(new WebApp(), "/foo", Thread.currentThread().getContextClassLoader(), "", "foo");
webModule.getRestClasses().add(MyFirstRestClass.class.getName());
return webModule;
}
use of org.apache.openejb.testing.Module in project tomee by apache.
the class AppExceptionTest method jar.
@Module
public EjbJar jar() {
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new SingletonBean(Ejb.class).localBean());
return ejbJar;
}
Aggregations