this.repository = (RepositoryImpl)container.getComponentInstanceOfType(RepositoryImpl.class);
this.systemLocationFactory = (LocationFactory)container.getComponentInstanceOfType(LocationFactory.class);
this.accessManager = (AccessManager)container.getComponentInstanceOfType(AccessManager.class);
WorkspaceEntry wsConfig = (WorkspaceEntry)container.getComponentInstanceOfType(WorkspaceEntry.class);
this.lazyReadThreshold =
wsConfig.getLazyReadThreshold() > 0 ? wsConfig.getLazyReadThreshold() : DEFAULT_LAZY_READ_THRESHOLD;
FileCleanerHolder cleanerHolder =
(FileCleanerHolder)container.getComponentInstanceOfType(FileCleanerHolder.class);
this.locationFactory = new LocationFactory(this);
this.valueFactory = new ValueFactoryImpl(locationFactory, wsConfig, cleanerHolder);
this.namespaces = new LinkedHashMap<String, String>();
this.prefixes = new LinkedHashMap<String, String>();
// Observation manager per session
ObservationManagerRegistry observationManagerRegistry =
(ObservationManagerRegistry)container.getComponentInstanceOfType(ObservationManagerRegistry.class);
ObservationManager observationManager = observationManagerRegistry.createObservationManager(this);
LocalWorkspaceDataManagerStub workspaceDataManager =
(LocalWorkspaceDataManagerStub)container.getComponentInstanceOfType(LocalWorkspaceDataManagerStub.class);
this.dataManager = new SessionDataManager(this, workspaceDataManager);
this.lockManager =
((WorkspaceLockManager)container.getComponentInstanceOfType(WorkspaceLockManager.class))
.getSessionLockManager(id, dataManager);
this.nodeTypeManager = (NodeTypeDataManager)container.getComponentInstanceOfType(NodeTypeDataManager.class);
this.workspace = new WorkspaceImpl(workspaceName, container, this, observationManager);
this.lifecycleListeners = new ArrayList<SessionLifecycleListener>();
this.registerLifecycleListener((ObservationManagerImpl)observationManager);
this.registerLifecycleListener(lockManager);
SessionActionCatalog catalog =
(SessionActionCatalog)container.getComponentInstanceOfType(SessionActionCatalog.class);
actionHandler = new SessionActionInterceptor(catalog, container, workspaceName);
sessionRegistry = (SessionRegistry)container.getComponentInstanceOfType(SessionRegistry.class);
sessionRegistry.registerSession(this);
this.lastAccessTime = System.currentTimeMillis();
this.triggerEventsForDescendentsOnRename =
wsConfig.getContainer().getParameterBoolean(WorkspaceDataContainer.TRIGGER_EVENTS_FOR_DESCENDENTS_ON_RENAME,
WorkspaceDataContainer.TRIGGER_EVENTS_FOR_DESCENDENTS_ON_RENAME_DEFAULT);
this.lazyNodeIteatorPageSize =
wsConfig.getContainer().getParameterInteger(WorkspaceDataContainer.LAZY_NODE_ITERATOR_PAGE_SIZE,
WorkspaceDataContainer.LAZY_NODE_ITERATOR_PAGE_SIZE_DEFAULT);
}