solved
Didn’t .register start the task?
Do private execution managers created with void executeOnce(java.lang.Runnable command) method of ExecutionManager Interface need to be unRegistered after the execute once is completed during shutdown? My understanding is that the execuateOnce tasks will take care of freeing them selves after execution is completed. We need to unRegister only the continuously running execution managers in order to interrupt the continuously scheduled tasks. Your comments will be appreciated.
Best Regards
PRAMANJ
The reason I asked this question is that there is no suitable unRegister method for tasks without owner variable. The interface gives following methods for unregistering:
void shutdown()
Stops all execution gracefully.
void unRegister(java.lang.String owner, java.lang.String name)
Unregisters a given command.
void unRegisterAll(java.lang.String owner)
Unregisters all commands for the given owner.
Only the first method void shutdown() looks applicable as the is no owner argument for an executeOnce task.
Any help will be appreciated.
Best Regards
[color=#0000BF]PRAMANJ[/color]
You don’t need to unregister a task unless you registered it first. Tasks submitted to executeOnce only run once and are not held on to.
Thanks a lot Kevin for the quick answer. One more thing can we have multiple executeOnce execution managers running in parallel? Can they be nested i.e. once execution manager thread creating another within its run function?
Regards
PRAMANJ
You can, but you shouldn’t need to. One ExecutionManager for your entire module should be more than enough.
Thanks a lot, it was a hypothetical question to check if my understanding was correct.
best regards
PRAMANJ