You should inject the reference to other session beans via @EJB instead of lookup it,this should set a dependency.
The @Schedule timer event is catch up all missing events if it is persistent (by default). If you don't want that behaviour you should set @Schedule(... persistent=false) this will avoid any catch up as long as the bean is down.
Thanks, This resolved the startup issue.
1. About setting persistent=false, Will turning persistent off guaranty a single invocation at a particular interval in a clustered environment (multiple jboss instances)?
2. I have also noticed receiving multiple invocations on single JVM at a specific interval. Can you guide about this too? Sorry for asking in the same thread.
Nevertheless how persistence is set, the schedule is per instance. That mean if you deploy the application in a cluster with X nodes the bean is called X-times
This is still the same as in former versions and still an issue (there are JIRA enhancements).
A naive expectation is that it is a unique application event in a cluster, but it isn't the EJB spec does not specify the behaviour in a cluster.
Can you explain a bit more, I don't understand what you meant ...
I mean the executeSomeMethod(Timer timer) is invoked multiple times after every 30 seconds. Thanks.
1 of 1 people found this helpful
that smell like a solved bug (in AS7) with persistence=true.
You should stop the server and remove all entries from the timers database or even drop the TIMERS tables.