Package org.apache.jackrabbit.servlet
Class JNDIRepositoryServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.apache.jackrabbit.servlet.AbstractRepositoryServlet
-
- org.apache.jackrabbit.servlet.JNDIRepositoryServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class JNDIRepositoryServlet extends AbstractRepositoryServlet
Servlet that makes a repository from JNDI available as an attribute in the servlet context.The supported initialization parameters of this servlet are:
- javax.jcr.Repository
-
Name of the servlet context attribute to put the repository in.
The default value is "
javax.jcr.Repository
". - location
-
Location of the repository in the JNDI directory.
The default value is "
javax/jcr/Repository
". - *
-
All other init parameters are used as the JNDI environment when
instantiating
InitialContext
for looking up the repository.
This servlet can also be mapped to the URL space. See
AbstractRepositoryServlet
for the details.- Since:
- 1.4
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JNDIRepositoryServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Repository
getRepository()
Returns a JNDI repository based on the configured init parameters.-
Methods inherited from class org.apache.jackrabbit.servlet.AbstractRepositoryServlet
destroy, doGet, getAttributeName, getInitParameter, init
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
getRepository
protected Repository getRepository() throws RepositoryException
Returns a JNDI repository based on the configured init parameters.- Specified by:
getRepository
in classAbstractRepositoryServlet
- Returns:
- JNDI repository
- Throws:
RepositoryException
- if the repository could not be created
-
-