1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.resourceref; 26 27 import static org.objectweb.easybeans.tests.common.helper.ContextHelper.checkResource; 28 29 import java.net.URL ; 30 31 import javax.annotation.Resource; 32 import javax.ejb.EJBContext ; 33 import javax.ejb.Remote ; 34 import javax.ejb.SessionContext ; 35 import javax.ejb.Stateless ; 36 import javax.jms.ConnectionFactory ; 37 import javax.jms.Queue ; 38 import javax.jms.QueueConnectionFactory ; 39 import javax.jms.Topic ; 40 import javax.jms.TopicConnectionFactory ; 41 import javax.mail.Session ; 42 import javax.sql.DataSource ; 43 44 import org.objectweb.easybeans.tests.common.ejbs.base.ItfResourceEnvRef00; 45 46 51 @Stateless (name = "SLSBResourceRefXMLInjection00") 52 @Remote (ItfResourceEnvRef00.class) 53 public class SLSBResourceRefXMLInjection00 implements ItfResourceEnvRef00 { 54 55 58 @Resource 59 private SessionContext sessionContext; 60 61 65 private DataSource ds00; 66 67 71 private ConnectionFactory cf00; 72 73 77 private QueueConnectionFactory qcf00; 78 79 83 private TopicConnectionFactory tcf00; 84 85 89 private Queue queue00; 90 91 95 private Topic topic00; 96 97 101 private Session mail00; 102 103 107 private URL url00; 108 109 113 private EJBContext ctx00; 114 115 118 public void checkJDBC() { 119 checkResource(sessionContext, ds00, "jdbc/ds00"); 120 } 121 122 125 public void checkJMSConFactory() { 126 checkResource(sessionContext, cf00, "jms/cf00"); 127 128 } 129 130 133 public void checkJMSQueueConFactory() { 134 checkResource(sessionContext, qcf00, "jms/qcf00"); 135 } 136 137 140 public void checkJMSTopicConFactory() { 141 checkResource(sessionContext, tcf00, "jms/tcf00"); 142 } 143 144 147 public void checkMailSession() { 148 checkResource(sessionContext, mail00, "mail/mail00"); 149 } 150 151 154 public void checkUrl() { 155 checkResource(sessionContext, url00, "url/url00"); 156 } 157 158 161 public void checkEJBContext() { 162 checkResource(sessionContext, ctx00, "ejbctx/ctx00"); 163 } 164 165 168 public void checkJMSQueue() { 169 checkResource(sessionContext, queue00, "jms/queue00"); 170 } 171 172 175 public void checkJMSTopic() { 176 checkResource(sessionContext, topic00, "jms/topic00"); 177 } 178 179 } 180 | Popular Tags |