Package org.apache.jackrabbit.servlet
Class JNDIBindingServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.apache.jackrabbit.servlet.JNDIBindingServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class JNDIBindingServlet extends javax.servlet.http.HttpServlet
Servlet that binds a repository from a servlet context attribute in JNDI.The initialization parameters of this servlet are:
- javax.jcr.Repository
-
Name of the servlet context attribute that contains the repository.
The default value is "
javax.jcr.Repository
". - location
-
Location where to bind 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 binding up the repository.
- Since:
- 1.4
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JNDIBindingServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Unbinds the repository from JNDI.void
init()
Binds a repository from the servlet context in the configured JNDI location.-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletException
Binds a repository from the servlet context in the configured JNDI location.- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
- if the repository could not be bound in JNDI
-
destroy
public void destroy()
Unbinds the repository from JNDI.- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classjavax.servlet.GenericServlet
-
-