info.magnolia.context
Class JCRSessionPerThreadSystemContext

java.lang.Object
  extended by info.magnolia.context.AbstractContext
      extended by info.magnolia.context.AbstractSystemContext
          extended by info.magnolia.context.JCRSessionPerThreadSystemContext
All Implemented Interfaces:
Context, SystemContext, ThreadDependentSystemContext, Serializable, Map

@Singleton
public class JCRSessionPerThreadSystemContext
extends AbstractSystemContext
implements ThreadDependentSystemContext

A system context which creates JCR sessions per thread (request). The sessions are released but not if any event listener has been registered on a session.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class info.magnolia.context.AbstractSystemContext
repositoryStrategyThreadLocal
 
Fields inherited from class info.magnolia.context.AbstractContext
locale
 
Fields inherited from interface info.magnolia.context.Context
APPLICATION_SCOPE, ATTRIBUTE_COMMENT, ATTRIBUTE_EXCEPTION, ATTRIBUTE_MESSAGE, ATTRIBUTE_PATH, ATTRIBUTE_RECURSIVE, ATTRIBUTE_REPOSITORY, ATTRIBUTE_UUID, ATTRIBUTE_VERSION, ATTRIBUTE_VERSION_MAP, LOCAL_SCOPE, SESSION_SCOPE
 
Constructor Summary
JCRSessionPerThreadSystemContext()
           
 
Method Summary
 JCRSessionStrategy getRepositoryStrategy()
           
 void releaseThread()
          Release all thread related stuff of the system context.
 
Methods inherited from class info.magnolia.context.AbstractSystemContext
getLocale, removeAttribute, setAttribute
 
Methods inherited from class info.magnolia.context.AbstractContext
clear, containsKey, containsValue, entrySet, get, getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getAttributeStrategy, getHierarchyManager, getJCRSession, getMessages, getMessages, getQueryManager, getSubject, getUser, isEmpty, keySet, put, putAll, release, remove, removeAttribute, setAttributeStrategy, setLocale, setRepositoryStrategy, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.magnolia.context.Context
getAccessManager, getAttribute, getAttribute, getAttributes, getAttributes, getHierarchyManager, getJCRSession, getLocale, getMessages, getMessages, getQueryManager, getSubject, getUser, release, removeAttribute, setAttribute, setLocale
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

JCRSessionPerThreadSystemContext

public JCRSessionPerThreadSystemContext()
Method Detail

getRepositoryStrategy

public JCRSessionStrategy getRepositoryStrategy()
Overrides:
getRepositoryStrategy in class AbstractContext

releaseThread

public void releaseThread()
Description copied from interface: ThreadDependentSystemContext
Release all thread related stuff of the system context.

Specified by:
releaseThread in interface ThreadDependentSystemContext


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.