Search in sources :

Example 1 with ServletRepository

use of org.apache.jackrabbit.servlet.ServletRepository in project jackrabbit by apache.

the class RemoteBindingServlet method getRemoteRepository.

/**
     * Returns the configured remote repository reference. The remote
     * repository is instantiated and memorized during the first call to
     * this method.
     *
     * @return remote repository
     * @throws ServletException if the repository could not be instantiated
     */
protected RemoteRepository getRemoteRepository() throws ServletException {
    if (remote == null) {
        try {
            RemoteAdapterFactory factory = getRemoteAdapterFactory();
            remote = factory.getRemoteRepository(new ServletRepository(this));
        } catch (RemoteException e) {
            throw new ServletException("Failed to create the remote repository reference", e);
        }
    }
    return remote;
}
Also used : ServletException(javax.servlet.ServletException) ServletRepository(org.apache.jackrabbit.servlet.ServletRepository) RemoteAdapterFactory(org.apache.jackrabbit.rmi.server.RemoteAdapterFactory) RemoteException(java.rmi.RemoteException)

Example 2 with ServletRepository

use of org.apache.jackrabbit.servlet.ServletRepository in project jackrabbit by apache.

the class AbstractLoginFilter method init.

public void init(FilterConfig config) {
    repository = new ServletRepository(config);
    workspace = config.getInitParameter("workspace");
    sessionAttribute = config.getInitParameter(Session.class.getName());
    if (sessionAttribute == null) {
        sessionAttribute = Session.class.getName();
    }
    nodeAttribute = config.getInitParameter(Node.class.getName());
    if (nodeAttribute == null) {
        nodeAttribute = Node.class.getName();
    }
}
Also used : Node(javax.jcr.Node) ServletRepository(org.apache.jackrabbit.servlet.ServletRepository) Session(javax.jcr.Session)

Aggregations

ServletRepository (org.apache.jackrabbit.servlet.ServletRepository)2 RemoteException (java.rmi.RemoteException)1 Node (javax.jcr.Node)1 Session (javax.jcr.Session)1 ServletException (javax.servlet.ServletException)1 RemoteAdapterFactory (org.apache.jackrabbit.rmi.server.RemoteAdapterFactory)1