org.modeshape.repository.util
Class SimpleSessionFactory
java.lang.Object
org.modeshape.repository.util.AbstractSessionFactory
org.modeshape.repository.util.SimpleSessionFactory
- All Implemented Interfaces:
- SessionFactory
public class SimpleSessionFactory
- extends AbstractSessionFactory
A SessionFactory implementation that creates Session
instances from a map of named Repository
references
managed by this factory.
By default, this factory creates an anonymous JCR session. To use sessions with specific Credentials
, simply
register
credentials for the appropriate repository/workspace name. For
security reasons, it is not possible to retrieve the Credentials once registered with this factory.
Constructor Summary |
SimpleSessionFactory()
Create an instance of the factory by creating a new InitialContext . |
SimpleSessionFactory(char... workspaceDelimiters)
Create an instance of the factory by supplying the characters that may be used to delimit the workspace name from the
repository name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSessionFactory
public SimpleSessionFactory()
- Create an instance of the factory by creating a new
InitialContext
.
SimpleSessionFactory
public SimpleSessionFactory(char... workspaceDelimiters)
- Create an instance of the factory by supplying the characters that may be used to delimit the workspace name from the
repository name.
- Parameters:
workspaceDelimiters
- the delimiters, or null/empty if the default delimiter of '/' should be used.
doRegisterRepository
protected void doRegisterRepository(String name,
javax.jcr.Repository repository)
-
- Specified by:
doRegisterRepository
in class AbstractSessionFactory
doUnregisterRepository
protected void doUnregisterRepository(String name)
throws SystemFailureException
-
- Specified by:
doUnregisterRepository
in class AbstractSessionFactory
- Throws:
SystemFailureException
findRegisteredRepository
protected javax.jcr.Repository findRegisteredRepository(String name)
throws SystemFailureException
-
- Specified by:
findRegisteredRepository
in class AbstractSessionFactory
- Throws:
SystemFailureException
Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.