I have a method, annotated as such :
@Schedule(hour = "*", minute = "*", second = "*/1")
public void sampleData () {... Process can be long or short ... }
Inside a @Singleton
EJB. The method is therefore executed by Glassfish every second.
Question :
What happens if the method takes more than 1 second to complete ?
- Is the invocation cancelled and another method invoked ?
- Are the calls to the method queued ?
- Are calls to this method halted whilst the method is still in execution ?
- Is the same method executed twice concurrently ? (not possible in @Singleton ??)
Would the @Asynchronous annotation modify the default behaviour ?
I want the method to execute every second and no calls made to the @Schedule method until all other instances have completed. How should I configure my class ?