1 22 package org.jboss.test.timer.ejb; 23 24 import javax.ejb.SessionBean ; 25 import javax.ejb.SessionContext ; 26 import javax.ejb.TimedObject ; 27 import javax.ejb.Timer ; 28 29 import org.jboss.logging.Logger; 30 31 41 public class TimerSFSBean 42 implements SessionBean , TimedObject 43 { 44 private static Logger log = Logger.getLogger(TimerSFSBean.class); 48 49 53 private SessionContext mContext; 54 55 59 62 public void checkTimerService() 63 { 64 log.info("TimerSFSBean.checkTimerService(), try to get a Timer Service from the Session Context"); 65 mContext.getTimerService(); 66 } 67 68 72 public void ejbCreate() 73 { 74 log.info("TimerSFSBean.ejbCreate()"); 75 } 76 77 public void ejbTimeout(Timer pTimer) 78 { 79 log.info("ejbTimeout(), timer: " + pTimer); 80 } 81 82 86 public String toString() 87 { 88 return "TimerSFSBean [ " + " ]"; 89 } 90 91 95 public void setSessionContext(SessionContext aContext) 96 { 97 mContext = aContext; 98 } 99 100 public void ejbActivate() 101 { 102 } 103 104 public void ejbPassivate() 105 { 106 } 107 108 public void ejbRemove() 109 { 110 } 111 } 112 | Popular Tags |