1 25 package org.objectweb.easybeans.tests.common.resources; 26 27 import javax.annotation.Resource; 28 import javax.ejb.SessionContext ; 29 import javax.ejb.TimerService ; 30 import javax.transaction.UserTransaction ; 31 32 33 39 public class SessionContextTester{ 40 41 44 @Resource 45 private SessionContext ctx; 46 47 50 public SessionContextTester(){ 51 } 52 53 57 @SuppressWarnings ("unused") 58 protected void access00() throws Exception { 59 if (ctx == null){ 61 throw new Exception ("SessionContext is null."); 62 } 63 } 64 65 66 70 @SuppressWarnings ("unused") 71 protected void access01() throws Exception { 72 TimerService ts = ctx.getTimerService(); 73 } 74 75 79 @SuppressWarnings ("unused") 80 protected void access02() throws Exception { 81 UserTransaction utx = ctx.getUserTransaction(); 82 } 83 } 84 | Popular Tags |