jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r215952 - in /incubator/jackrabbit/trunk/contrib/jcr-server: server/src/java/org/apache/jackrabbit/webdav/jcr/ server/src/java/org/apache/jackrabbit/webdav/jcr/property/ server/src/java/org/apache/jackrabbit/webdav/jcr/search/ webapp/src/ja...
Date Tue, 12 Jul 2005 14:04:25 GMT
Author: tripod
Date: Tue Jul 12 07:04:18 2005
New Revision: 215952

URL: http://svn.apache.org/viewcvs?rev=215952&view=rev
Log:
- adjusting to jackrabbit/commons changes
- removing static variables from servlets

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
    incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java?rev=215952&r1=215951&r2=215952&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DefaultItemResource.java
Tue Jul 12 07:04:18 2005
@@ -111,7 +111,7 @@
                 Value val = ValueHelper.deserialize(strVal, type, false);
                 prop.setValue(val);
             } else if (property.getName().equals(JCR_VALUES)) {
-                prop.setValue(new ValuesProperty(property).getValues(getRepositorySession().getValueFactory(),
prop.getType()));
+                prop.setValue(new ValuesProperty(property).getValues(prop.getType()));
             } else {
                 throw new DavException(DavServletResponse.SC_CONFLICT);
             }

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java?rev=215952&r1=215951&r2=215952&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/ValuesProperty.java
Tue Jul 12 07:04:18 2005
@@ -24,7 +24,6 @@
 import javax.jcr.Value;
 import javax.jcr.ValueFormatException;
 import javax.jcr.RepositoryException;
-import javax.jcr.ValueFactory;
 import java.util.List;
 import java.util.Iterator;
 import java.util.ArrayList;
@@ -98,7 +97,7 @@
      * @return Array of Value objects
      * @throws RepositoryException
      */
-    public Value[] getValues(ValueFactory fac, int propertyType) throws ValueFormatException,
RepositoryException {
+    public Value[] getValues(int propertyType) throws ValueFormatException, RepositoryException
{
 	Element[] propValue = (Element[])getValue();
 	Value[] values = new Value[propValue.length];
 	for (int i = 0; i < propValue.length; i++) {

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java?rev=215952&r1=215951&r2=215952&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/search/SearchResultProperty.java
Tue Jul 12 07:04:18 2005
@@ -26,7 +26,6 @@
 import javax.jcr.Value;
 import javax.jcr.RepositoryException;
 import javax.jcr.PropertyType;
-import javax.jcr.ValueFactory;
 import java.util.*;
 
 /**
@@ -62,7 +61,7 @@
      * @throws IllegalArgumentException if the specified property does have the
      * required form.
      */
-    public SearchResultProperty(ValueFactory fac, DavProperty property) throws RepositoryException
{
+    public SearchResultProperty(DavProperty property) throws RepositoryException {
         super(SEARCH_RESULT_PROPERTY, true);
         if (!SEARCH_RESULT_PROPERTY.equals(property.getName())) {
 	    throw new IllegalArgumentException("SearchResultProperty may only be created with a
property that has name="+SEARCH_RESULT_PROPERTY.getName());

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java?rev=215952&r1=215951&r2=215952&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/JCRWebdavServerServlet.java
Tue Jul 12 07:04:18 2005
@@ -27,6 +27,7 @@
 import org.apache.jackrabbit.server.AbstractWebdavServlet;
 
 import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.jcr.Repository;
 import javax.jcr.Credentials;
@@ -70,13 +71,15 @@
 	pathPrefix = getInitParameter(INIT_PARAM_PREFIX);
 	log.debug(INIT_PARAM_PREFIX + " = " + pathPrefix);
 
-	Repository repository = RepositoryAccessServlet.getRepository();
+        final ServletContext ctx = getServletContext();
+
+	Repository repository = RepositoryAccessServlet.getRepository(ctx);
 	if (repository == null) {
 	    throw new ServletException("Repository could not be retrieved. Check config of 'RepositoryAccessServlet'.");
 	}
         CredentialsProvider cp = new CredentialsProvider() {
             public Credentials getCredentials(HttpServletRequest request) throws LoginException,
ServletException {
-                return RepositoryAccessServlet.getCredentialsFromHeader(request.getHeader(DavConstants.HEADER_AUTHORIZATION));
+                return RepositoryAccessServlet.getCredentialsFromHeader(ctx, request.getHeader(DavConstants.HEADER_AUTHORIZATION));
             }
         };
 

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java?rev=215952&r1=215951&r2=215952&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
Tue Jul 12 07:04:18 2005
@@ -24,6 +24,7 @@
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
 import javax.jcr.*;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
@@ -61,16 +62,9 @@
     /** Authorization header name */
     private static final String HEADER_AUTHORIZATION = "Authorization";
 
-    /** the configured repository name */
-    private static String repositoryName;
+    private static final String CTX_ATTR_REPOSITORY = "jcr.repository";
 
-    private static String rmiURI;
-
-    private static InitialContext jndiContext;
-
-    private static Repository repository;
-
-    private static String missingAuthMapping;
+    private String repositoryName;
 
     /**
      * Initializes this servlet
@@ -80,11 +74,33 @@
     public void init() throws ServletException {
 	initLog4J();
 	log.info("RepositoryAccessServlet initializing...");
-	initJNDI();
-	initRMI();
-	initRepository();
-        missingAuthMapping = getServletConfig().getInitParameter(INIT_PARAM_MISSING_AUTH_MAPPING);
-        log.info("  " + INIT_PARAM_MISSING_AUTH_MAPPING + " = " + missingAuthMapping);
+        repositoryName = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_NAME);
+        if (repositoryName==null) {
+            repositoryName="default";
+        }
+        Repository repository = null;
+
+        // try to retrieve via rmi
+        if (repository == null) {
+            String rmiURI = getRMIUri();
+            if (rmiURI != null) {
+                repository = getRepositoryByRMI(rmiURI);
+            }
+        }
+        // try to retrieve via jndi
+        if (repository == null) {
+            InitialContext context = getInitialContext();
+            if (context != null) {
+                repository = getRepositoryByJNDI(context);
+            }
+        }
+        // error
+        if (repository == null) {
+            log.error("Unable to retrieve repository");
+            throw new ServletException("Unable to retrieve repository");
+        }
+        getServletContext().setAttribute(CTX_ATTR_REPOSITORY, repository);
+        log.info(repository.getDescriptor(Repository.REP_NAME_DESC) + " v" + repository.getDescriptor(Repository.REP_VERSION_DESC));
 
 	log.info("RepositoryAccessServlet initialized.");
     }
@@ -109,14 +125,7 @@
 	log = Logger.getLogger(RepositoryAccessServlet.class);
     }
 
-    private void initJNDI() throws ServletException {
-	// setup repository name
-	repositoryName = getServletConfig().getInitParameter(INIT_PARAM_REPOSITORY_NAME);
-	if (repositoryName==null) {
-	    repositoryName="default";
-	}
-	log.info("  repository-name = " + repositoryName);
-
+    private InitialContext getInitialContext() throws ServletException {
 	// retrieve JNDI Context environment
 	try {
 	    Properties env = new Properties();
@@ -128,78 +137,59 @@
 		    log.info("  adding property to JNDI environment: " + name + "=" + env.getProperty(name));
 		}
 	    }
-	    jndiContext = new InitialContext(env);
+	    return new InitialContext(env);
 	} catch (NamingException e) {
 	    log.error("Create initial context: " + e.toString());
 	    throw new ServletException(e);
 	}
     }
 
-    private void initRMI() {
+    private String getRMIUri() {
 	// setup repository name
-	rmiURI = getServletConfig().getInitParameter(INIT_PARAM_RMI_URI);
-	if (rmiURI != null) {
-	    log.info("  rmi-uri = " + rmiURI);
-	}
-    }
-
-    /**
-     * tries to retrieve the repository
-     */
-    private void initRepository() throws ServletException {
-	getRepositoryByRMI();
-	if (repository == null) {
-	    getRepositoryByJNDI();
-	}
-	if (repository == null) {
-	    log.error("Unable to retrieve repository");
-	    throw new ServletException("Unable to retrieve repository");
-	}
-	log.info(repository.getDescriptor(Repository.REP_NAME_DESC) + " v" + repository.getDescriptor(Repository.REP_VERSION_DESC));
+	return getServletConfig().getInitParameter(INIT_PARAM_RMI_URI);
     }
 
     /**
      * tries to retrieve the repository using RMI
      */
-    private void getRepositoryByJNDI() {
-	if (jndiContext != null) {
-	    // acquire via JNDI
-	    try {
-		repository = (Repository) jndiContext.lookup(repositoryName);
-	    } catch (NamingException e) {
-		log.error("Error while retrieving repository using JNDI: " + e);
-		return;
-	    }
-	    log.info("Acquired repository via JNDI.");
-	}
+    private Repository getRepositoryByJNDI(InitialContext jndiContext) {
+        // acquire via JNDI
+        try {
+            Repository r = (Repository) jndiContext.lookup(repositoryName);
+            log.info("Acquired repository via JNDI.");
+            return r;
+        } catch (NamingException e) {
+            log.error("Error while retrieving repository using JNDI (name=" + repositoryName
+"): " + e);
+            return null;
+        }
     }
 
     /**
      * tries to retrieve the repository using RMI
      */
-    private void getRepositoryByRMI() {
-	if (rmiURI != null) {
-	    // acquire via RMI
-	    ClientFactoryDelegater cfd = null;
-	    try {
-		Class clazz = Class.forName("org.apache.jackrabbit.j2ee.RMIClientFactoryDelegater");
-		cfd = (ClientFactoryDelegater) clazz.newInstance();
-	    } catch (NoClassDefFoundError e) {
-		log.error("Unable to locate RMI ClientRepositoryFactory. jcr-rmi.jar missing? " + e.toString());
-		return;
-	    } catch (Exception e) {
-		log.error("Unable to locate RMI ClientRepositoryFactory. jcr-rmi.jar missing?" + e.toString());
-		return;
-	    }
-
-	    try {
-		repository = cfd.getRepository(rmiURI);
-	    } catch (Exception e) {
-		log.error("Error while retrieving repository using RMI: " + e);
-		return;
-	    }
-	    log.info("Acquired repository via RMI.");
-	}
+    private Repository getRepositoryByRMI(String rmiURI) {
+        // acquire via RMI
+        log.info("  trying to retrieve repository using rmi. uri=" + rmiURI);
+        ClientFactoryDelegater cfd = null;
+        try {
+            Class clazz = Class.forName("org.apache.jackrabbit.j2ee.RMIClientFactoryDelegater");
+            cfd = (ClientFactoryDelegater) clazz.newInstance();
+        } catch (NoClassDefFoundError e) {
+            log.error("Unable to locate RMI ClientRepositoryFactory. jcr-rmi.jar missing?
" + e.toString());
+            return null;
+        } catch (Exception e) {
+            log.error("Unable to locate RMI ClientRepositoryFactory. jcr-rmi.jar missing?"
+ e.toString());
+            return null;
+        }
+
+        try {
+            Repository r = cfd.getRepository(rmiURI);
+            log.info("Acquired repository via RMI.");
+            return r;
+        } catch (Exception e) {
+            log.error("Error while retrieving repository using RMI: " + e);
+            return null;
+        }
     }
 
     /**
@@ -207,8 +197,8 @@
      *
      * @return a jsr170 repository
      */
-    public static Repository getRepository() {
-	return repository;
+    public static Repository getRepository(ServletContext ctx) {
+	return (Repository) ctx.getAttribute(CTX_ATTR_REPOSITORY);
     }
 
     /**
@@ -234,10 +224,10 @@
      * Authorization header.
      * @throws LoginException if no suitable auth header and missing-auth-mapping
      * is not present
-     * @see #getRepository()
-     * @see #login(HttpServletRequest)
+     * @see #getRepository(ServletContext)
      */
-    public static Credentials getCredentialsFromHeader(String authHeader)
+    public static Credentials getCredentialsFromHeader(ServletContext ctx,
+                                                       String authHeader)
 	    throws ServletException, LoginException {
 	try {
 	    if (authHeader != null) {
@@ -253,6 +243,7 @@
 		}
 	    }
             // check special handling
+            String missingAuthMapping = ctx.getInitParameter(INIT_PARAM_MISSING_AUTH_MAPPING);
             if (missingAuthMapping == null) {
                 throw new LoginException();
             } else if (missingAuthMapping.equals("")) {
@@ -280,21 +271,22 @@
      * login ({@link Repository#login(javax.jcr.Credentials)}), thus the default
      * workspace will be selected. In order to provide a specific workspace name,
      * manual {@link Repository#login(Credentials, String) login} is required (see
-     * also {@link #getRepository()}).
+     * also {@link #getRepository(ServletContext)}).
      *
      * @param request
      * @return  Session object obtained upon {@link Repository#login(javax.jcr.Credentials)}.
      * @throws ServletException
      * @throws LoginException if credentials are invalid
-     * @see #getRepository() in order to be able to login to a specific workspace.
-     * @see #getCredentialsFromHeader(String) for a utility method to retrieve
+     * @see #getRepository(ServletContext) in order to be able to login to a specific workspace.
+     * @see #getCredentialsFromHeader(ServletContext, String) for a utility method to retrieve
      * credentials from the Authorization header string.
      */
-    public static Session login(HttpServletRequest request)
+    public static Session login(ServletContext ctx, HttpServletRequest request)
             throws LoginException, ServletException {
         String authHeader = request.getHeader(HEADER_AUTHORIZATION);
 	try {
-	    return repository.login(getCredentialsFromHeader(authHeader));
+            Repository rep = getRepository(ctx);
+	    return rep.login(getCredentialsFromHeader(ctx, authHeader));
         } catch (LoginException e) {
             throw e;
 	} catch (RepositoryException e) {

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java?rev=215952&r1=215951&r2=215952&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
Tue Jul 12 07:04:18 2005
@@ -63,16 +63,16 @@
     public final static String INIT_PARAM_LOG4J_CONFIG = "log4j-config";
 
     /** the registered repository */
-    private static Repository repository;
+    private Repository repository;
 
     /** the name of the repository as configured */
-    private static String repositoryName;
+    private String repositoryName;
 
     /** the jndi context, created base on configuration */
-    private static InitialContext jndiContext;
+    private InitialContext jndiContext;
 
     /** the rmi uri, in the form of  '//:${rmi-port}/${repository-name}' */
-    private static String rmiURI;
+    private String rmiURI;
 
     /**
      * Initializes the servlet
@@ -115,7 +115,7 @@
     private void initLog4J() throws ServletException {
 	// setup log4j
 	String log4jConfig = getServletConfig().getInitParameter(INIT_PARAM_LOG4J_CONFIG);
-	InputStream in =getServletContext().getResourceAsStream(log4jConfig);
+	InputStream in = getServletContext().getResourceAsStream(log4jConfig);
 	if (in==null) {
 	    // try normal init
 	    PropertyConfigurator.configure(log4jConfig);

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java?rev=215952&r1=215951&r2=215952&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/webapp/src/java/org/apache/jackrabbit/j2ee/SimpleWebdavServlet.java
Tue Jul 12 07:04:18 2005
@@ -43,6 +43,7 @@
 import javax.jcr.LoginException;
 import javax.jcr.Repository;
 import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 import java.net.URL;
@@ -79,20 +80,22 @@
      */
     public static final String INIT_PARAM_AUTHENTICATE_HEADER = "authenticate-header";
 
+    public static final String CTX_ATTR_RESOURCE_PATH_PREFIX = "jcr.webdav.resourcepath";
+
     /**
-     * the repository prefix retrieved from config
+     * the resource path prefix
      */
-    private static String resourcePathPrefix;
+    private String resourcePathPrefix;
 
     /**
      * the chain catalog for i/o operations
      */
-    private static Catalog chainCatalog;
+    private Catalog chainCatalog;
 
     /**
      * Header value as specified in the {@link #INIT_PARAM_AUTHENTICATE_HEADER} parameter.
      */
-    private static String authenticate_header;
+    private String authenticate_header;
 
     /**
      * Map used to remember any webdav lock created without being reflected
@@ -143,6 +146,7 @@
             log.debug("Path prefix ends with '/' > removing trailing slash.");
             resourcePathPrefix = resourcePathPrefix.substring(0, resourcePathPrefix.length()
- 1);
         }
+        getServletContext().setAttribute(CTX_ATTR_RESOURCE_PATH_PREFIX, resourcePathPrefix);
         log.info(INIT_PARAM_RESOURCE_PATH_PREFIX + " = '" + resourcePathPrefix + "'");
 
         try {
@@ -261,11 +265,21 @@
      * @return resourcePathPrefix
      * @see #INIT_PARAM_RESOURCE_PATH_PREFIX
      */
-    public static String getPathPrefix() {
+    public String getPathPrefix() {
         return resourcePathPrefix;
     }
 
     /**
+     * Returns the configured path prefix
+     *
+     * @return resourcePathPrefix
+     * @see #INIT_PARAM_RESOURCE_PATH_PREFIX
+     */
+    public static String getPathPrefix(ServletContext ctx) {
+        return (String) ctx.getAttribute(CTX_ATTR_RESOURCE_PATH_PREFIX);
+    }
+
+    /**
      * Returns the <code>DavLocatorFactory</code>. If no locator factory has
      * been set or created a new instance of {@link org.apache.jackrabbit.webdav.simple.LocatorFactoryImpl}
is
      * returned.
@@ -345,13 +359,13 @@
      * returned.
      *
      * @return the session provider
-     * @see RepositoryAccessServlet#getCredentialsFromHeader(String)
+     * @see RepositoryAccessServlet#getCredentialsFromHeader(ServletContext, String)
      */
     public synchronized SessionProvider getSessionProvider() {
         if (sessionProvider == null) {
             CredentialsProvider cp = new CredentialsProvider() {
                 public Credentials getCredentials(HttpServletRequest request) throws LoginException,
ServletException {
-                    return RepositoryAccessServlet.getCredentialsFromHeader(request.getHeader(DavConstants.HEADER_AUTHORIZATION));
+                    return RepositoryAccessServlet.getCredentialsFromHeader(getServletContext(),
request.getHeader(DavConstants.HEADER_AUTHORIZATION));
                 }
             };
             sessionProvider = new SessionProviderImpl(cp);
@@ -413,11 +427,11 @@
      * is returned.
      *
      * @return repository
-     * @see RepositoryAccessServlet#getRepository()
+     * @see RepositoryAccessServlet#getRepository(ServletContext)
      */
     public Repository getRepository() {
         if (repository == null) {
-            repository = RepositoryAccessServlet.getRepository();
+            repository = RepositoryAccessServlet.getRepository(getServletContext());
             if (repository == null) {
                 throw new IllegalStateException("Repository could not be retrieved. Check
config of 'RepositoryAccessServlet'.");
             }



Mime
View raw message