Choosing a ThreadExecutionStrategy
ThreadWork instances need to provide a strategy defining the execution policies for its work. That is, how the work for a thread will be processed. The interface that is implemented is ThreadExecutionStrategy. The most important aspect of this is how exceptions will be treated with respect to transactions.
Should all the ThreadWorkUnits be wrapped in a single transaction with a single rollback on an exception?
Should each ThreadWorkUnit be in its own transaction?
Should the framework attempt to process many ThreadWorkUnits within a single transaction?
If an exception occurs should the framework "back up" and reprocess the successful units?
In general, new background processes are expected to chose from existing instances of ThreadExecutionStrategy, not create new ones. Please scan for existing implementations of ThreadExecutionStrategy.