I'm writing this post here because there was nobody that helped me in stackoverflow and I really haven't found the answer to this.
So I`ll reproduce my question here:
What I understand from the below code is that whenever the server either crash or I stop the deployed artifact inside the server, the Persistent=false should clean the timer meaning that whenever the application starts again, it won't try to run jobs that should have been ran before. Which is not happening. So from my point of view, this is a bug from JBoss AS 7.1.1, but I couldn't find fix/workaround for this.
public class RetrieveScheduledJob
@Schedule(minute = "0,10,20,30,40,50", hour = "*", persistent = false)
synchronized public void runRetrieve() throws InterruptedException
Another minor issue is that, because of the above issue, I might have the same job running in parallel. I tried to fix with synchronized and @Singleton, but maybe I`m missing something.
JBoss AS 7.1.1
Link to stackoverflow question: http://stackoverflow.com/questions/20416284/persistent-false-for-schedule-doesnt-work-in-jboss-as-7-1-1
If you guys have at least a workaround for this issue, it would be nice.
Did you check that with a fresh AS instance, maybe you have deployed first with "persistent=true" and there was a bug in AS that the schedule is not removed from the persistence if you change the flag from true to false.
This is solved in a later version.