org.modeshape.web.jcr
Class RepositoryFactory
java.lang.Object
org.modeshape.web.jcr.RepositoryFactory
@ThreadSafe
public class RepositoryFactory
- extends Object
Factory that provides implementations of the repository provider SPI
by wrapping a
RepositoryProvider
.
The repository factory implements a lifecycle for the repository providers. It is first initialized
by ModeShapeJcrDeployer
, a servlet context listener that must be configured in the ModeShape JCR REST web
configuration (web.xml). The repository factory looks in the context for a parameter with the name of PROVIDER_KEY
.
This is assumed to be the FQN of the repository provider
, which the factory will then instantiate.
The repository factory is then able to respond to multiple requests to list the repository
names
and return active JCR sessions
until the shutdown method
is called.
The shutdown method
is a simple proxy to the RepositoryProvider.shutdown()
repository provider's
shutdown method}.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROVIDER_KEY
public static final String PROVIDER_KEY
- The FQN of the repository provider class. Currently set to "org.modeshape.web.jcr.REPOSITORY_PROVIDER" .
- See Also:
- Constant Field Values
getSession
public static Session getSession(javax.servlet.http.HttpServletRequest request,
String repositoryName,
String workspaceName)
throws RepositoryException
- Throws:
RepositoryException
getJcrRepositoryNames
public static Collection<String> getJcrRepositoryNames()
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.