What is considered the best practice for propagating classLoader and compositeContext across threads? For example when a binding dispatches to a service, should it be copied from the thread that initialized the binding to the thread where the binding dispatches? For example, the Axis binding propagates the classLoader before the service dispatch. Should the WorkScheduler propagate either of these to the work items that it runs?
Is there any infrastructure in place for allowing a binding to decide whether queued dispatch or a direct dispatch is more appropriate? A couple examples of what I mean: * It would be nice to direct dispatch and avoid the context switch if the system throughput is sufficient to prevent a backlog, but otherwise the main consideration is accepting inbound work requests until some high water mark is reached. This case benefits greatly from a mechanism to coordinate across bindings. * Some bindings may require the dispatch to occur in the same thread of control as the binding due to legacy transaction issues that have thread of control affinity. Does anything need to be done to communicate this requirement to the rest of the framework so a request doesn't get swapped to another thread by another component in the chain of command.
