lastMessageInvoked = invokeMessage(theTran);
}
};
// Wrap the work with the correct context, if needed.
ContextManager contextMgr = SandeshaUtil.getContextManager(configurationContext);
if(contextMgr != null) {
work = contextMgr.wrapWithContext(work, nextBean.getContext());
}
// Finally do the work
work.run();
tran = null;
} else {
if(log.isDebugEnabled()) log.debug("InvokerWorker:: not pooled thread");
nextWorker = new InvokerWorker(configurationContext, nextBean);
nextWorker.setPooled();
nextWorker.setWorkId(workId);
// Wrap the invoker worker with the correct context, if needed.
ContextManager contextMgr = SandeshaUtil.getContextManager(configurationContext);
if(contextMgr != null) {
nextRunnable = contextMgr.wrapWithContext(nextWorker, nextBean.getContext());
} else {
nextRunnable = nextWorker;
}
}
}