Skip to content

Commit

Permalink
Make timers non-persistent. IQSS#5345
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Nov 17, 2020
1 parent a75aadf commit ebcd1e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -129,7 +129,7 @@ public SavedSearch save(SavedSearch savedSearch) {
}


@Schedule(dayOfWeek="0", hour="0",minute="30")
@Schedule(dayOfWeek="0", hour="0", minute="30", persistent = false)
public void makeLinksForAllSavedSearchesTimer() {
if (systemConfig.isTimerServer()) {
logger.info("Linking saved searches");
Expand Down
Expand Up @@ -32,6 +32,7 @@
import javax.ejb.Startup;
import javax.ejb.Timeout;
import javax.ejb.Timer;
import javax.ejb.TimerConfig;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -97,7 +98,7 @@ public void createTimer(Date initialExpiration, long intervalDuration, Serializa
} catch (UnknownHostException ex) {
Logger.getLogger(DataverseTimerServiceBean.class.getName()).log(Level.SEVERE, null, ex);
}
timerService.createTimer(initialExpiration, intervalDuration, info);
timerService.createIntervalTimer(initialExpiration, intervalDuration, new TimerConfig(info, false));
}

/**
Expand Down

0 comments on commit ebcd1e0

Please sign in to comment.