You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2019/05/07 08:25:00 UTC
svn commit: r1858832 - in /jackrabbit/branches/2.14: ./ jackrabbit-webapp/
jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/
jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/
Author: reschke
Date: Tue May 7 08:25:00 2019
New Revision: 1858832
URL: http://svn.apache.org/viewvc?rev=1858832&view=rev
Log:
JCR-4229: Remove Oak dependency in webapp (ported to 2.14)
Removed:
jackrabbit/branches/2.14/jackrabbit-webapp/src/test/java/org/apache/jackrabbit/j2ee/BackwardsCompatibilityIT.java
Modified:
jackrabbit/branches/2.14/ (props changed)
jackrabbit/branches/2.14/jackrabbit-webapp/pom.xml
jackrabbit/branches/2.14/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
Propchange: jackrabbit/branches/2.14/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 7 08:25:00 2019
@@ -1,3 +1,3 @@
/jackrabbit/branches/JCR-2272:1173165-1176545
/jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1776907,1776911-1776912,1776914,1776918,1779166,1779460,1779614,1779632,1780208,1780220,1780335-1780336,1780406,1785225,1786325,1786330,1787043,1787381,1792100,1792105,1792113,1792193,1793315,1793323,1793327,1793332,1793339,1796980,1797209,1797917,1798586,1799429,1799538,1799549,1799575,1800359,1800378,1800752,1802925,1802977,1807234,1807244,1808752,1808754,1809149,1809329,1809624,1810108,1811667,1812543,1812634,1812994,1814831,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831854,1831860,1832058,1832090,1833374,1833835,1833891,1834008,1834308,1834315,1834401,1834418,1834424,1834673,1834922,1835445,1835448,1835459,1836349,1846665,1847167,1856855
+/jackrabbit/trunk:1776907,1776911-1776912,1776914,1776918,1779166,1779460,1779614,1779632,1780208,1780220,1780335-1780336,1780406,1785225,1786325,1786330,1787043,1787381,1792100,1792105,1792113,1792193,1793315,1793323,1793327,1793332,1793339,1796980,1797209,1797917,1798586,1799429,1799538,1799549,1799575,1800359,1800378,1800752,1802925,1802977,1807234,1807244,1808752,1808754,1809149,1809329,1809624,1810108,1811667,1812543,1812634,1812994,1814831,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1820753,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831854,1831860,1832058,1832090,1833374,1833835,1833891,1834008,1834308,1834315,1834401,1834418,1834424,1834673,1834922,1835445,1835448,1835459,1836349,1846665,1847167,185
6855
Modified: jackrabbit/branches/2.14/jackrabbit-webapp/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.14/jackrabbit-webapp/pom.xml?rev=1858832&r1=1858831&r2=1858832&view=diff
==============================================================================
--- jackrabbit/branches/2.14/jackrabbit-webapp/pom.xml (original)
+++ jackrabbit/branches/2.14/jackrabbit-webapp/pom.xml Tue May 7 08:25:00 2019
@@ -35,7 +35,6 @@
<description>Web application that hosts and serves a Jackrabbit content repository</description>
<properties>
- <oak.version>1.0.39</oak.version>
<tomcat.version>8.5.32</tomcat.version>
</properties>
@@ -79,16 +78,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>oak-jcr</artifactId>
- <version>${oak.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jackrabbit</groupId>
- <artifactId>oak-upgrade</artifactId>
- <version>${oak.version}</version>
- </dependency>
- <dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
Modified: jackrabbit/branches/2.14/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.14/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java?rev=1858832&r1=1858831&r2=1858832&view=diff
==============================================================================
--- jackrabbit/branches/2.14/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java (original)
+++ jackrabbit/branches/2.14/jackrabbit-webapp/src/main/java/org/apache/jackrabbit/j2ee/RepositoryStartupServlet.java Tue May 7 08:25:00 2019
@@ -20,10 +20,6 @@ import org.apache.jackrabbit.api.Jackrab
import org.apache.jackrabbit.commons.repository.RepositoryFactory;
import org.apache.jackrabbit.core.RepositoryImpl;
import org.apache.jackrabbit.core.config.RepositoryConfig;
-import org.apache.jackrabbit.oak.jcr.Jcr;
-import org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore;
-import org.apache.jackrabbit.oak.plugins.segment.SegmentStore;
-import org.apache.jackrabbit.oak.plugins.segment.file.FileStore;
import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory;
import org.apache.jackrabbit.rmi.server.ServerAdapterFactory;
import org.apache.jackrabbit.servlet.AbstractRepositoryServlet;
@@ -139,13 +135,13 @@ import javax.servlet.http.HttpServletRes
* <p>
* <p>
* <b>Setup Wizard Functionality</b><br>
- * When using the first time, the configuraition can miss the relevant
+ * When using the first time, the configuration can miss the relevant
* repository parameters in the web.xml. if so, it must contain a
- * <code>bootstrap-config</code> parameter that referrs to a propertiy file.
- * This file must exsit for proper working. If not, the repository is not
+ * <code>bootstrap-config</code> parameter that refers to a property file.
+ * This file must exist for proper working. If not, the repository is not
* started.<br>
* If the servlet is not configured correctly and accessed via http, it will
- * provide a simple wizard for the first time configuration. It propmpts for
+ * provide a simple wizard for the first time configuration. It prompts for
* a new (or existing) repository home and will copy the templates of the
* repository.xml and bootstrap.properties to the respective location.
*/
@@ -172,11 +168,6 @@ public class RepositoryStartupServlet ex
static String bootstrapOverride = null;
/**
- * the TarMK segment store
- */
- private SegmentStore store;
-
- /**
* the registered repository
*/
private Repository repository;
@@ -410,7 +401,7 @@ public class RepositoryStartupServlet ex
"Repository configuration failure: " + config.getRepositoryHome(), e);
}
String repConfig = config.getRepositoryConfig();
- if (repConfig != null) { // Jackrabbit Classic
+ if (repConfig != null) {
InputStream in = getServletContext().getResourceAsStream(repConfig);
if (in == null) {
try {
@@ -431,14 +422,8 @@ public class RepositoryStartupServlet ex
} catch (RepositoryException e) {
throw new ServletExceptionWithCause("Error while creating repository", e);
}
- } else { // Jackrabbit Oak
- try {
- String model = System.getProperty("sun.arch.data.model", "32");
- store = new FileStore(repHome, 256, "64".equals(model));
- repository = new Jcr(new SegmentNodeStore(store)).createRepository();
- } catch (IOException e) {
- throw new ServletExceptionWithCause("Error while creating repository", e);
- }
+ } else {
+ throw new ServletException("Missing configuration");
}
}
@@ -449,10 +434,7 @@ public class RepositoryStartupServlet ex
* <code>nulled</code>.
*/
private void shutdownRepository() {
- if (store != null) {
- store.close();
- store = null;
- } else if (repository instanceof JackrabbitRepository) {
+ if (repository instanceof JackrabbitRepository) {
((JackrabbitRepository) repository).shutdown();
}
repository = null;