use of org.apache.openejb.jee.EjbJar$JAXB in project tomee by apache.
the class CheckAnnotationTest method testWebServiceWithMessageDriven.
@Keys({ @Key(value = "annotation.invalid.messagedriven.webservice", type = KeyType.WARNING) })
public AppModule testWebServiceWithMessageDriven() {
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new MessageDrivenBean(Yellow.class));
final EjbModule ejbModule = new EjbModule(ejbJar);
ejbModule.setFinder(new AnnotationFinder(new ClassesArchive(Yellow.class)).link());
final AppModule appModule = new AppModule(ejbModule);
return appModule;
}
use of org.apache.openejb.jee.EjbJar$JAXB in project tomee by apache.
the class CheckAnnotationTest method testWebServiceWithManagedBean.
@Keys({ @Key(value = "annotation.invalid.managedbean.webservice", type = KeyType.WARNING) })
public AppModule testWebServiceWithManagedBean() {
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new ManagedBean(Red.class));
final EjbModule ejbModule = new EjbModule(ejbJar);
ejbModule.setFinder(new AnnotationFinder(new ClassesArchive(Red.class)).link());
final AppModule appModule = new AppModule(ejbModule);
return appModule;
}
use of org.apache.openejb.jee.EjbJar$JAXB in project tomee by apache.
the class CheckAnnotationTest method shouldWarnForLocalAnnotationOnBeanWithNoInterface.
@Keys({ @Key(value = "ann.local.forLocalBean", type = KeyType.WARNING) })
public EjbModule shouldWarnForLocalAnnotationOnBeanWithNoInterface() {
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatelessBean(EjbWithoutInterface.class));
final EjbModule ejbModule = new EjbModule(ejbJar);
ejbModule.setFinder(new AnnotationFinder(new ClassesArchive(EjbWithoutInterface.class)).link());
return ejbModule;
}
use of org.apache.openejb.jee.EjbJar$JAXB in project tomee by apache.
the class CheckDependsOnTest method dependsOn.
@Keys({ @Key(value = "dependsOn.circuit", count = 2), @Key(value = "dependsOn.noSuchEjb", count = 2) })
public EjbJar dependsOn() throws OpenEJBException {
final EjbJar ejbJar = new EjbJar();
final SingletonBean one = new SingletonBean(One.class);
final SingletonBean two = new SingletonBean(Two.class);
final SingletonBean three = new SingletonBean(Three.class);
final SingletonBean four = new SingletonBean(Four.class);
final SingletonBean five = new SingletonBean(Five.class);
final SingletonBean six = new SingletonBean(Six.class);
ejbJar.addEnterpriseBean(one);
ejbJar.addEnterpriseBean(two);
ejbJar.addEnterpriseBean(three);
ejbJar.addEnterpriseBean(four);
ejbJar.addEnterpriseBean(five);
ejbJar.addEnterpriseBean(six);
return ejbJar;
}
use of org.apache.openejb.jee.EjbJar$JAXB in project tomee by apache.
the class Green method testSystemPropertyNames.
@Keys({ @Key(value = "incorrect.property.name", type = KeyType.WARNING) })
public AppModule testSystemPropertyNames() {
// SystemInstance.get().setProperty("java.persistence.provider", "test");
SystemInstance.get().setProperty("javax.naming.referral", "test");
final EjbJar ejbJar = new EjbJar();
ejbJar.addEnterpriseBean(new StatefulBean(Green.class));
return new AppModule(new EjbModule(ejbJar));
}
Aggregations