this.workContext = workContext;
this.next = next;
}
public Message invoke(final Message msg) {
final CompositeContext currentContext = CurrentCompositeContext.getContext();
// Schedule the invocation of the next interceptor in a new Work instance
try {
workScheduler.scheduleWork(new Runnable() {
public void run() {
workContext.setCurrentMessageId(null);
workContext.setCurrentCorrelationId(null);
CompositeContext oldContext = CurrentCompositeContext.getContext();
try {
BINDER.setContext(currentContext);
next.invoke(msg);
} catch (Exception e) {
// REVIEW uncomment when it is available