You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by xu...@apache.org on 2011/05/16 02:37:39 UTC

svn commit: r1103587 - in /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer: TimerData.java TimerServiceImpl.java

Author: xuhaihong
Date: Mon May 16 00:37:38 2011
New Revision: 1103587

URL: http://svn.apache.org/viewvc?rev=1103587&view=rev
Log:
OPENEJB-1550 By default, all timers created using the timer creation methods should be persistent. (Patch from Shawn Jiang)

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerData.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerServiceImpl.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerData.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerData.java?rev=1103587&r1=1103586&r2=1103587&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerData.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerData.java Mon May 16 00:37:38 2011
@@ -92,7 +92,7 @@ public abstract class TimerData {
         this.deploymentId = deploymentId;
         this.primaryKey = primaryKey;
         this.info = timerConfig == null ? null : timerConfig.getInfo();
-        this.persistent = timerConfig == null ? false : timerConfig.isPersistent();
+        this.persistent = timerConfig == null ? true : timerConfig.isPersistent();
         this.timer = new TimerImpl(this);
         this.timeoutMethod = timeoutMethod;
     }

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerServiceImpl.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerServiceImpl.java?rev=1103587&r1=1103586&r2=1103587&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerServiceImpl.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerServiceImpl.java Mon May 16 00:37:38 2011
@@ -39,19 +39,19 @@ public class TimerServiceImpl implements
     }
 
     public Timer createTimer(Date initialExpiration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException {
-        return ejbTimerService.createTimer(primaryKey, ejbTimeout, initialExpiration, intervalDuration, new TimerConfig(info, false));
+        return ejbTimerService.createTimer(primaryKey, ejbTimeout, initialExpiration, intervalDuration, new TimerConfig(info, true));
     }
 
     public Timer createTimer(Date expiration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException {
-        return ejbTimerService.createTimer(primaryKey, ejbTimeout, expiration, new TimerConfig(info, false));
+        return ejbTimerService.createTimer(primaryKey, ejbTimeout, expiration, new TimerConfig(info, true));
     }
 
     public Timer createTimer(long initialDuration, long intervalDuration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException {
-        return ejbTimerService.createTimer(primaryKey, ejbTimeout, initialDuration, intervalDuration, new TimerConfig(info, false));
+        return ejbTimerService.createTimer(primaryKey, ejbTimeout, initialDuration, intervalDuration, new TimerConfig(info, true));
     }
 
     public Timer createTimer(long duration, Serializable info) throws IllegalArgumentException, IllegalStateException, EJBException {
-        return ejbTimerService.createTimer(primaryKey, ejbTimeout, duration, new TimerConfig(info, false));
+        return ejbTimerService.createTimer(primaryKey, ejbTimeout, duration, new TimerConfig(info, true));
     }
 
     public Collection<Timer> getTimers() throws IllegalStateException, EJBException {
@@ -76,7 +76,7 @@ public class TimerServiceImpl implements
 
     public Timer createCalendarTimer(ScheduleExpression scheduleExpression) throws IllegalArgumentException, IllegalStateException, EJBException {
         
-        return ejbTimerService.createTimer(primaryKey, ejbTimeout, copy(scheduleExpression), new TimerConfig(null, false));
+        return ejbTimerService.createTimer(primaryKey, ejbTimeout, copy(scheduleExpression), new TimerConfig(null, true));
     }
 
     public Timer createCalendarTimer(ScheduleExpression scheduleExpression, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException {