use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class JaxWsInvocationTest method buildTestApp.
public EjbModule buildTestApp() {
final EjbJar ejbJar = new EjbJar();
final StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean(EchoBean.class));
bean.setServiceEndpoint(EchoServiceEndpoint.class.getName());
return new EjbModule(this.getClass().getClassLoader(), this.getClass().getSimpleName(), "test", ejbJar, null);
}
use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class EntityManagerPropogationTest method addStatelessBean.
private void addStatelessBean(final EjbJar ejbJar, final Class<?> ejbClass, final String name, final String reference) {
final StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean(name, ejbClass));
bean.getEjbLocalRef().add(new EjbLocalRef("child", reference));
}
use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class ThisInConstructorTest method bean.
@Module
public StatelessBean bean() {
final StatelessBean bean = new StatelessBean(AStatelessWithAConstructor.class);
bean.setLocalBean(new Empty());
return bean;
}
use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class FullyInterceptedTest method module.
@Module
public EjbJar module() {
final EjbJar ejbJar = new EjbJar();
final StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean(FullyInterceptedBean.class));
final AssemblyDescriptor assembly = ejbJar.getAssemblyDescriptor();
assembly.addInterceptorBinding(new InterceptorBinding("*", new Interceptor(DefaultInterceptorOne.class)));
assembly.addInterceptorBinding(new InterceptorBinding("*", new Interceptor(DefaultInterceptorTwo.class)));
final InterceptorBinding b = assembly.addInterceptorBinding(new InterceptorBinding(bean));
b.setExcludeDefaultInterceptors(true);
b.setMethod(new NamedMethod("methodWithDefaultInterceptorsExcluded"));
return ejbJar;
}
use of org.apache.openejb.jee.StatelessBean in project tomee by apache.
the class MethodLevelInterceptorOnlyTest method module.
@Module
public EjbJar module() {
final EjbJar ejbJar = new EjbJar();
final StatelessBean bean = ejbJar.addEnterpriseBean(new StatelessBean(MethodLevelInterceptorOnlySLSBean.class));
final AssemblyDescriptor assembly = ejbJar.getAssemblyDescriptor();
assembly.addInterceptorBinding(new InterceptorBinding("*", new Interceptor(DefaultInterceptorOne.class)));
assembly.addInterceptorBinding(new InterceptorBinding("*", new Interceptor(DefaultInterceptorTwo.class)));
assembly.addInterceptorBinding(new InterceptorBinding(bean)).setExcludeDefaultInterceptors(true);
return ejbJar;
}
Aggregations