Skip to content

Instantly share code, notes, and snippets.

@leapingbytes
Created October 8, 2014 10:32
Show Gist options
  • Save leapingbytes/01838d9534638cb04200 to your computer and use it in GitHub Desktop.
Save leapingbytes/01838d9534638cb04200 to your computer and use it in GitHub Desktop.
@schedule annotation produces "Cannot invoke timeout method because method null is not a timeout method" upon second and all consecutive executions
@Singleton
@Startup
public class SettingsManagerImpl implements SettingsManager {
...
@Schedule(hour = "*", minute = "*", second="13")
public void checkSettingsProviders() {
...
}
...
}
@Singleton
@Startup
public class SettingsManagerImpl implements SettingsManager {
...
protected Timer timer;
...
public void setup() {
timer = timerService.createTimer(60*1000, 60*1000, null);
}
...
@Timeout
public void checkSettingsProviders() {
...
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment