ReferenceFactory rootKeyAwareSimpleRefFactory = NodeIdentifierReferenceFactory.newInstance(rootKey, decoder, factories,
true, true);
context = context.with(rootKeyAwareStrongRefFactory).with(rootKeyAwareWeakRefFactory).with(rootKeyAwareSimpleRefFactory);
// Create an execution context for this session that uses a local namespace registry ...
final NamespaceRegistry globalNamespaceRegistry = context.getNamespaceRegistry(); // thread-safe!
final LocalNamespaceRegistry localRegistry = new LocalNamespaceRegistry(globalNamespaceRegistry); // not-thread-safe!
this.context = context.with(localRegistry);
this.sessionRegistry = new JcrNamespaceRegistry(Behavior.SESSION, localRegistry, globalNamespaceRegistry, this);
this.workspace = new JcrWorkspace(this, workspaceName);