jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1043546 - in /jackrabbit/branches/2.2: ./ jackrabbit-webapp/ jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/ jackrabbit-webapp/src/main/webapp/WEB-INF/ jackrabbit-webapp/src/test/ jackrabbit-webapp/src/test/java/ jackrabbit-web...
Date Wed, 08 Dec 2010 17:47:48 GMT
Author: jukka
Date: Wed Dec  8 17:47:47 2010
New Revision: 1043546

URL: http://svn.apache.org/viewvc?rev=1043546&view=rev
Log:
2.2: Merged revisions 1043357 and 1043358 (JCR-2584 and JCR-2831)

Added:
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/
      - copied from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/java/
      - copied from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/java/
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/java/org/
      - copied from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/java/org/apache/
      - copied from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/
      - copied from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/
      - copied from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
      - copied unchanged from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/TomcatIT.java
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/resources/
      - copied from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/resources/
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/resources/default-web.xml
      - copied unchanged from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/resources/default-web.xml
    jackrabbit/branches/2.2/jackrabbit-webapp/src/test/resources/logback-test.xml
      - copied unchanged from r1043358, jackrabbit/trunk/jackrabbit-webapp/src/test/resources/logback-test.xml
Removed:
    jackrabbit/branches/2.2/jackrabbit-webapp/src/main/webapp/WEB-INF/log4j.xml
Modified:
    jackrabbit/branches/2.2/   (props changed)
    jackrabbit/branches/2.2/jackrabbit-webapp/pom.xml
    jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
    jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
    jackrabbit/branches/2.2/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml

Propchange: jackrabbit/branches/2.2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec  8 17:47:47 2010
@@ -2,4 +2,4 @@
 /jackrabbit/sandbox/JCR-1456:774917-886178
 /jackrabbit/sandbox/JCR-2170:812417-816332
 /jackrabbit/sandbox/tripod-JCR-2209:795441-795863
-/jackrabbit/trunk:1038201,1038203,1038205,1038657,1039064,1039347,1039408,1039422-1039423,1039888,1039946,1040033,1040090,1040459,1040601,1040606,1040661,1040958,1041379,1041439,1041761,1042643,1042647,1042978-1042982,1043084-1043086,1043088
+/jackrabbit/trunk:1038201,1038203,1038205,1038657,1039064,1039347,1039408,1039422-1039423,1039888,1039946,1040033,1040090,1040459,1040601,1040606,1040661,1040958,1041379,1041439,1041761,1042643,1042647,1042978-1042982,1043084-1043086,1043088,1043343,1043357-1043358,1043430

Modified: jackrabbit/branches/2.2/jackrabbit-webapp/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webapp/pom.xml?rev=1043546&r1=1043545&r2=1043546&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webapp/pom.xml (original)
+++ jackrabbit/branches/2.2/jackrabbit-webapp/pom.xml Wed Dec  8 17:47:47 2010
@@ -34,6 +34,10 @@
   <name>Jackrabbit Web Application</name>
   <description>Web application that hosts and serves a Jackrabbit content repository</description>
 
+  <properties>
+    <tomcat.version>6.0.29</tomcat.version>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>javax.jcr</groupId>
@@ -75,8 +79,56 @@
       <artifactId>logback-classic</artifactId>
     </dependency>
     <dependency>
-      <groupId>javax.servlet</groupId>
+      <groupId>org.apache.tomcat</groupId>
       <artifactId>servlet-api</artifactId>
+      <version>${tomcat.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>catalina</artifactId>
+      <version>${tomcat.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>coyote</artifactId>
+      <version>${tomcat.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>jasper</artifactId>
+      <version>${tomcat.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>net.sourceforge.htmlunit</groupId>
+      <artifactId>htmlunit</artifactId>
+      <version>2.8</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl-over-slf4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jul-to-slf4j</artifactId>
+      <version>${slf4j.version}</version>
+      <scope>test</scope>
     </dependency>
   </dependencies>
 
@@ -147,4 +199,34 @@
     </plugins>
   </build>
 
+  <profiles>
+    <profile>
+      <id>integrationTesting</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-failsafe-plugin</artifactId>
+            <version>2.6</version>
+            <configuration>
+              <workingDirectory>${project.build.directory}</workingDirectory>
+              <systemPropertyVariables>
+                <webapp.directory>${project.build.directory}/${project.artifactId}-${project.version}</webapp.directory>
+                <default.webxml>${basedir}/src/test/resources/default-web.xml</default.webxml>
+              </systemPropertyVariables>
+            </configuration>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>integration-test</goal>
+                  <goal>verify</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
 </project>

Modified: jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java?rev=1043546&r1=1043545&r2=1043546&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
(original)
+++ jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryAccessServlet.java
Wed Dec  8 17:47:47 2010
@@ -303,10 +303,9 @@ public class RepositoryAccessServlet ext
             }
             return repository;
         } catch (ServletException e) {
-            log.error(
-                    "The content repository is not available. Please check"
+            throw new IllegalStateException(
+                    "The repository is not available. Please check"
                     + " RepositoryAccessServlet configuration in web.xml.", e);
-            throw new IllegalStateException("The repository is not available.");
         }
     }
 

Modified: jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java?rev=1043546&r1=1043545&r2=1043546&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
(original)
+++ jackrabbit/branches/2.2/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
Wed Dec  8 17:47:47 2010
@@ -44,7 +44,6 @@ import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
 import java.rmi.server.RMIServerSocketFactory;
 import java.rmi.server.UnicastRemoteObject;
-import java.util.NoSuchElementException;
 import java.util.Properties;
 
 import javax.jcr.Repository;
@@ -239,10 +238,11 @@ public class RepositoryStartupServlet ex
         }
         log.info("RepositoryStartupServlet initializing...");
         try {
-            configure();
-            initRepository();
-            registerRMI();
-            registerJNDI();
+            if (configure()) {
+                initRepository();
+                registerRMI();
+                registerJNDI();
+            }
             log.info("RepositoryStartupServlet initialized.");
         } catch (ServletException e) {
             // shutdown repository
@@ -321,7 +321,7 @@ public class RepositoryStartupServlet ex
      * successful.
      * @throws ServletException if an error occurs.
      */
-    private void configure() throws ServletException {
+    private boolean configure() throws ServletException {
         // check if there is a loadable bootstrap config
         Properties bootstrapProps = new Properties();
         String bstrp = getServletConfig().getInitParameter(INIT_PARAM_BOOTSTRAP_CONFIG);
@@ -366,15 +366,16 @@ public class RepositoryStartupServlet ex
                 || config.getRepositoryConfig() == null) {
             if (bstrp == null) {
                 log.error("Repository startup configuration is not valid.");
-                throw new ServletException("Repository startup configuration is not valid.");
             } else {
                 log.error("Repository startup configuration is not valid but a bootstrap
config is specified.");
                 log.error("Either create the {} file or", bstrp);
                 log.error("use the '/config/index.jsp' for easy configuration.");
-                throw new ServletException("Repository startup configuration is not valid.");
             }
+            return false;
+        } else {
+            config.logInfos();
+            return true;
         }
-        config.logInfos();
     }
 
     /**

Modified: jackrabbit/branches/2.2/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.2/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml?rev=1043546&r1=1043545&r2=1043546&view=diff
==============================================================================
--- jackrabbit/branches/2.2/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ jackrabbit/branches/2.2/jackrabbit-webapp/src/main/webapp/WEB-INF/web.xml Wed Dec  8 17:47:47
2010
@@ -21,23 +21,6 @@
     <display-name>Jackrabbit JCR Server</display-name>
 
     <!-- ====================================================================== -->
-    <!-- L O G G I N G   S E R V L E T                                          -->
-    <!-- ====================================================================== -->
-    <servlet>
-        <servlet-name>Logging</servlet-name>
-        <description>The logging servlet configures the Log4J logging facility.</description>
-        <servlet-class>org.apache.jackrabbit.j2ee.LoggingServlet</servlet-class>
-
-        <init-param>
-            <param-name>log4j-config</param-name>
-            <param-value>/WEB-INF/log4j.xml</param-value>
-            <description>initial log4j configuration</description>
-        </init-param>
-
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-
-    <!-- ====================================================================== -->
     <!-- R E P O S I T O R Y   S T A R T U P  S E R V L E T                     -->
     <!-- ====================================================================== -->
     <servlet>



Mime
View raw message