Search in sources :

Example 1 with Module

use of org.apache.openejb.testing.Module in project tomee by apache.

the class ActiveMQResourceAdapterControlTest method app.

@Module
@Classes(value = Mdb.class)
public EjbModule app() {
    return new EjbModule(new EjbJar("test"), new OpenejbJar() {

        {
            setId("test");
            getEjbDeployment().add(new EjbDeployment() {

                {
                    setEjbName("ejb/Mdb");
                    getProperties().put("MdbActiveOnStartup", "false");
                    getProperties().put("MdbJMXControl", "default:type=test");
                }
            });
        }
    });
}
Also used : OpenejbJar(org.apache.openejb.jee.oejb3.OpenejbJar) EjbModule(org.apache.openejb.config.EjbModule) EjbDeployment(org.apache.openejb.jee.oejb3.EjbDeployment) EjbJar(org.apache.openejb.jee.EjbJar) EjbModule(org.apache.openejb.config.EjbModule) Module(org.apache.openejb.testing.Module) Classes(org.apache.openejb.testing.Classes)

Example 2 with Module

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;
}
Also used : Beans(org.apache.openejb.jee.Beans) Module(org.apache.openejb.testing.Module)

Example 3 with Module

use of org.apache.openejb.testing.Module in project tomee by apache.

the class BasicObserverTest method getBeans.

@Module
public Beans getBeans() {
    final Beans beans = new Beans();
    beans.addManagedClass(SuperHero.class);
    return beans;
}
Also used : Beans(org.apache.openejb.jee.Beans) Module(org.apache.openejb.testing.Module)

Example 4 with Module

use of org.apache.openejb.testing.Module in project tomee by apache.

the class CdiDecoratorMultipleDelegateCallsTest method classes.

@Module
@Classes({ ServiceImpl.class })
public EjbModule classes() {
    final Beans beans = new Beans();
    beans.addDecorator(ServiceDecorator.class);
    final EjbModule jar = new EjbModule(new EjbJar());
    jar.setBeans(beans);
    return jar;
}
Also used : Beans(org.apache.openejb.jee.Beans) EjbModule(org.apache.openejb.config.EjbModule) EjbJar(org.apache.openejb.jee.EjbJar) EjbModule(org.apache.openejb.config.EjbModule) Module(org.apache.openejb.testing.Module) Classes(org.apache.openejb.testing.Classes)

Example 5 with Module

use of org.apache.openejb.testing.Module in project tomee by apache.

the class DependentScopedTest method getBeans.

@Module
public Beans getBeans() {
    final Beans beans = new Beans();
    // beans.addManagedClass(ColorWheel.class);
    beans.addManagedClass(Red.class);
    beans.addManagedClass(Orange.class);
    beans.addManagedClass(Yellow.class);
    beans.addManagedClass(Green.class);
    beans.addManagedClass(Blue.class);
    beans.addManagedClass(Violet.class);
    return beans;
}
Also used : Beans(org.apache.openejb.jee.Beans) Module(org.apache.openejb.testing.Module)

Aggregations

Module (org.apache.openejb.testing.Module)95 EjbJar (org.apache.openejb.jee.EjbJar)35 StatelessBean (org.apache.openejb.jee.StatelessBean)25 EjbModule (org.apache.openejb.config.EjbModule)22 SingletonBean (org.apache.openejb.jee.SingletonBean)21 Empty (org.apache.openejb.jee.Empty)19 Persistence (org.apache.openejb.jee.jpa.unit.Persistence)19 PersistenceUnit (org.apache.openejb.jee.jpa.unit.PersistenceUnit)19 Beans (org.apache.openejb.jee.Beans)14 OpenejbJar (org.apache.openejb.jee.oejb3.OpenejbJar)11 Classes (org.apache.openejb.testing.Classes)10 AppModule (org.apache.openejb.config.AppModule)8 Resources (org.apache.openejb.config.sys.Resources)6 Service (org.apache.openejb.config.sys.Service)6 PojoDeployment (org.apache.openejb.jee.oejb3.PojoDeployment)6 Properties (java.util.Properties)5 AssemblyDescriptor (org.apache.openejb.jee.AssemblyDescriptor)5 Interceptor (org.apache.openejb.jee.Interceptor)5 InterceptorBinding (org.apache.openejb.jee.InterceptorBinding)5 WebModule (org.apache.openejb.config.WebModule)4