1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.ejbref; 26 27 import static org.objectweb.easybeans.tests.common.helper.ContextHelper.checkBeanRef; 28 29 import javax.annotation.Resource; 30 import javax.ejb.EJB ; 31 import javax.ejb.Remote ; 32 import javax.ejb.SessionContext ; 33 import javax.ejb.Stateless ; 34 35 import org.objectweb.easybeans.tests.common.ejbs.base.ItfEJBRef; 36 import org.objectweb.easybeans.tests.common.ejbs.base.ItfOneMethod01; 37 38 43 @Stateless (name = "SLSBEjbRefFieldInjection") 44 @Remote (ItfEJBRef.class) 45 public class SLSBEjbRefFieldInjection implements ItfEJBRef { 46 47 50 @Resource 51 private SessionContext ctx; 52 53 56 @EJB 57 private ItfOneMethod01 bean00; 58 59 62 @EJB (name = "ejb/bean01", description = "This bean is used to test name and description properties of the @EJB annotation.") 63 private ItfOneMethod01 bean01; 64 65 68 @EJB (beanInterface = ItfOneMethod01.class) 69 private ItfOneMethod01 bean02; 70 71 74 @EJB (beanName = "EJBInjectionBean") 75 private ItfOneMethod01 bean03; 76 77 80 @EJB (mappedName = "org.objectweb.easybeans.tests.common.ejbs.base.EJBInjectionBean_org.objectweb.easybeans.tests.common." 81 + "ejbs.base.ItfOneMethod01@Remote") 82 private ItfOneMethod01 bean04; 83 84 87 @EJB (name = "ejb/bean05", beanInterface = ItfOneMethod01.class, beanName = "EJBInjectionBean", description = "bean05") 88 private ItfOneMethod01 bean05; 89 90 93 @EJB (name = "ejb/bean06", beanInterface = ItfOneMethod01.class, beanName = "EJBInjectionBean", description = "bean06", 94 mappedName = "org.objectweb.easybeans.tests.common.ejbs.base.EJBInjectionBean_org.objectweb.easybeans.tests.common." 95 + "ejbs.base.ItfOneMethod01@Remote") 96 private ItfOneMethod01 bean06; 97 98 102 public void check00() { 103 assert bean00.getBool(); 104 checkBeanRef(ctx, 105 "org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged." 106 + "ejbref.SLSBEjbRefFieldInjection/bean00", ItfOneMethod01.class); 107 } 108 109 113 public void check01() { 114 assert bean01.getBool(); 115 checkBeanRef(ctx, "ejb/bean01", ItfOneMethod01.class); 116 } 117 118 122 public void check02() { 123 assert bean02.getBool(); 124 checkBeanRef(ctx, 125 "org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged." 126 + "ejbref.SLSBEjbRefFieldInjection/bean02", ItfOneMethod01.class); 127 } 128 129 133 public void check03() { 134 assert bean03.getBool(); 135 checkBeanRef(ctx, 136 "org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged." 137 + "ejbref.SLSBEjbRefFieldInjection/bean03", ItfOneMethod01.class); 138 } 139 140 144 public void check04() { 145 assert bean04.getBool(); 146 checkBeanRef(ctx, 147 "org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged." 148 + "ejbref.SLSBEjbRefFieldInjection/bean04", ItfOneMethod01.class); 149 } 150 151 155 public void check05() { 156 assert bean05.getBool(); 157 checkBeanRef(ctx, "ejb/bean05", ItfOneMethod01.class); 158 } 159 160 164 public void check06() { 165 assert bean06.getBool(); 166 checkBeanRef(ctx, "ejb/bean06", ItfOneMethod01.class); 167 } 168 } 169 | Popular Tags |