this.context = context.with(localRegistry);
this.sessionRegistry = new JcrNamespaceRegistry(Behavior.SESSION, localRegistry, globalNamespaceRegistry, this);
this.workspace = new JcrWorkspace(this, workspaceName);
// Create the session cache ...
this.cache = repositoryCache.createSession(this.context, workspaceName, readOnly);
this.rootNode = new JcrRootNode(this, this.cache.getRootKey());
this.jcrNodes.put(this.rootNode.key(), this.rootNode);
this.sessionAttributes = sessionAttributes != null ? sessionAttributes : Collections.<String, Object>emptyMap();
// Pre-cache all of the namespaces to be a snapshot of what's in the global registry at this time.