org.apache.jackrabbit.servlet.remote
Class JNDIRemoteBindingServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.jackrabbit.servlet.remote.RemoteBindingServlet
              extended by org.apache.jackrabbit.servlet.remote.JNDIRemoteBindingServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JNDIRemoteBindingServlet
extends RemoteBindingServlet

Servlet that binds a repository from a servlet context attribute to JNDI as a remote repository reference.

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".
org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
Name of the remote adapter factory class used to create the remote repository reference. The configured class should have public constructor that takes no arguments.
location
Location where to bind the repository in the JNDI directory. The default value is "org/apache/jackrabbit/rmi/remote/RemoteRepository".
*
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
JNDIRemoteBindingServlet()
           
 
Method Summary
 void destroy()
          Unbinds the remote repository from JNDI.
 void init()
          Binds a repository from the servlet context in the configured RMI URL.
 
Methods inherited from class org.apache.jackrabbit.servlet.remote.RemoteBindingServlet
doGet, getRemoteRepository
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIRemoteBindingServlet

public JNDIRemoteBindingServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Binds a repository from the servlet context in the configured RMI URL.

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException - if the repository could not be bound in RMI

destroy

public void destroy()
Unbinds the remote repository from JNDI.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.