@Override
public ContextHandle saveContext(ContextService contextService, Map<String, String> contextObjectProperties) {
// Capture the current thread context
ClassLoader contextClassloader = null;
SecurityContext currentSecurityContext = null;
ComponentInvocation savedInvocation = null;
if (classloading) {
contextClassloader = Utility.getClassLoader();
}
if (security) {
currentSecurityContext = SecurityContext.getCurrent();
}
ComponentInvocation currentInvocation = invocationManager.getCurrentInvocation();
if (currentInvocation != null) {
savedInvocation = createComponentInvocation(currentInvocation);
}
boolean useTransactionOfExecutionThread = transactionManager == null && useTransactionOfExecutionThread(contextObjectProperties);
// TODO - support workarea propagation