djencks 2005/02/02 11:28:18
Modified: modules/core/src/java/org/openejb/timer
TimerServiceImpl.java
Log:
GERONIMO-565. Removing an entity bean should cancel its timers
Revision Changes Path
1.3 +5 -2
openejb/modules/core/src/java/org/openejb/timer/TimerServiceImpl.java
Index: TimerServiceImpl.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/timer/TimerServiceImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TimerServiceImpl.java 20 Jul 2004 23:40:03 -0000 1.2
+++ TimerServiceImpl.java 2 Feb 2005 16:28:18 -0000 1.3
@@ -49,6 +49,7 @@
import java.util.Date;
import java.util.Collection;
+import java.util.Collections;
import java.io.Serializable;
import javax.ejb.TimerService;
@@ -91,6 +92,8 @@
}
public Collection getTimers() throws IllegalStateException, EJBException
{
- return timerService.getTimers(context.getId());
+ //TODO this check is here because entity bean remove calls this to
get the list of timers to cancel.
+ //Possibly there is a better place to check that the entity bean is
a timed object.
+ return timerService == null? Collections.EMPTY_SET:
timerService.getTimers(context.getId());
}
}