1 22 23 package org.jboss.test.timer.ejb; 24 25 import java.io.Serializable ; 26 import java.util.Date ; 27 import javax.ejb.EJBException ; 28 import javax.ejb.SessionBean ; 29 import javax.ejb.SessionContext ; 30 import javax.ejb.Timer ; 31 import javax.ejb.TimerService ; 32 33 40 public class NoTimedObjectBean 41 implements SessionBean 42 { 43 private SessionContext context; 44 45 public byte[] startSingleTimer(long pPeriod) 46 { 47 return startSingleTimer(pPeriod,"TimerSLSBean.startSingleTimer"); 48 } 49 50 public byte[] startSingleTimer(long pPeriod, Serializable info) 51 { 52 TimerService ts = context.getTimerService(); 53 throw new EJBException ("startSingleTimer.getTimerService should have failed"); 54 } 55 56 public byte[] startTimer(long pPeriod) 57 { 58 TimerService ts = context.getTimerService(); 59 throw new EJBException ("startSingleTimer.getTimerService should have failed"); 60 } 61 62 public byte[] startTimer(long pPeriod, Serializable info) 63 { 64 TimerService ts = context.getTimerService(); 65 throw new EJBException ("startSingleTimer.getTimerService should have failed"); 66 } 67 68 public void stopTimer(byte[] handle) 69 { 70 TimerService ts = context.getTimerService(); 71 throw new EJBException ("startSingleTimer.getTimerService should have failed"); 72 } 73 74 public int getTimeoutCount(byte[] handle) 75 { 76 return 0; 77 } 78 79 public Date getNextTimeout(byte[] handle) 80 { 81 return null; 82 } 83 84 public long getTimeRemaining(byte[] handle) 85 { 86 return 0; 87 } 88 89 public Object getInfo(byte[] handle) 90 { 91 return null; 92 } 93 94 public long getRetryTimeoutPeriod() 95 { 96 return 0; 97 } 98 99 public void ejbCreate() 100 { 101 } 102 103 public void ejbTimeout(Timer timer) 104 { 105 } 106 107 public void setSessionContext(SessionContext context) 108 { 109 this.context = context; 110 } 111 112 public void ejbActivate() 113 { 114 } 115 116 public void ejbPassivate() 117 { 118 } 119 120 public void ejbRemove() 121 { 122 } 123 124 } 125 | Popular Tags |