Package org.modeshape.jcr.cache.document

Examples of org.modeshape.jcr.cache.document.WritableSessionCache


                        if (documentStore.localStore().putIfAbsent(rootKey.toString(), rootDoc) == null) {
                            // we are the first node to perform the initialization, so we need to link the system node
                            if (!RepositoryCache.this.systemWorkspaceName.equals(name)) {
                                logger.debug("Creating '{0}' workspace in repository '{1}'", name, getName());
                                SessionCache workspaceSession = new WritableSessionCache(context, workspaceCache, sessionContext);
                                MutableCachedNode workspaceRootNode = workspaceSession.mutable(workspaceSession.getRootKey());
                                workspaceRootNode.linkChild(workspaceSession, RepositoryCache.this.systemKey, JcrLexicon.SYSTEM);

                                // this will be enrolled in the active transaction
                                workspaceSession.save();
                            }
                        }
                        return workspaceCache;
                    }
                });
View Full Code Here


            boolean readOnly) {
        WorkspaceCache workspaceCache = workspace(workspaceName);
        if (readOnly || workspaceCache.isExternal()) {
            return new ReadOnlySessionCache(context, workspaceCache, sessionContext);
        }
        return new WritableSessionCache(context, workspaceCache, sessionContext);
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.cache.document.WritableSessionCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.