if (from != null) {
parameters = from.getReferenceParameters();
}
// check what sort of context is required
if (scopeContainer != null) {
Scope scope = scopeContainer.getScope();
if (scope == Scope.REQUEST) {
contextId = Thread.currentThread();
} else if (scope == Scope.CONVERSATION && parameters != null) {
contextId = parameters.getConversationID();
}