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 2024/02/11 13:43:18 UTC

(jackrabbit) 01/01: JCR-5028: remove RMI support

This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch JCR-5028
in repository https://gitbox.apache.org/repos/asf/jackrabbit.git

commit 5f5f2adeb9ba1d1270a66846603b67f62ae1a231
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Sun Feb 11 14:42:48 2024 +0100

    JCR-5028: remove RMI support
---
 jackrabbit-jcr-rmi/HEADER.txt                      |  16 -
 jackrabbit-jcr-rmi/README.txt                      |   6 -
 jackrabbit-jcr-rmi/checkstyle.xml                  | 164 -----
 jackrabbit-jcr-rmi/pom.xml                         | 583 ---------------
 .../rmi/client/BrokenRemoteRepository.java         | 180 -----
 .../rmi/client/ClientAdapterFactory.java           | 459 ------------
 .../apache/jackrabbit/rmi/client/ClientItem.java   | 212 ------
 .../rmi/client/ClientItemDefinition.java           | 117 ---
 .../apache/jackrabbit/rmi/client/ClientLock.java   | 142 ----
 .../jackrabbit/rmi/client/ClientLockManager.java   | 110 ---
 .../rmi/client/ClientNamespaceRegistry.java        | 111 ---
 .../apache/jackrabbit/rmi/client/ClientNode.java   | 800 ---------------------
 .../rmi/client/ClientNodeDefinition.java           | 104 ---
 .../jackrabbit/rmi/client/ClientNodeType.java      | 317 --------
 .../rmi/client/ClientNodeTypeManager.java          | 151 ----
 .../apache/jackrabbit/rmi/client/ClientObject.java | 131 ----
 .../rmi/client/ClientObservationManager.java       | 144 ----
 .../jackrabbit/rmi/client/ClientProperty.java      | 447 ------------
 .../rmi/client/ClientPropertyDefinition.java       | 117 ---
 .../apache/jackrabbit/rmi/client/ClientQuery.java  | 145 ----
 .../jackrabbit/rmi/client/ClientQueryManager.java  |  99 ---
 .../jackrabbit/rmi/client/ClientQueryResult.java   |  99 ---
 .../jackrabbit/rmi/client/ClientRepository.java    | 219 ------
 .../rmi/client/ClientRepositoryFactory.java        | 137 ----
 .../apache/jackrabbit/rmi/client/ClientRow.java    | 131 ----
 .../jackrabbit/rmi/client/ClientSession.java       | 589 ---------------
 .../jackrabbit/rmi/client/ClientVersion.java       | 154 ----
 .../rmi/client/ClientVersionHistory.java           | 219 ------
 .../rmi/client/ClientVersionManager.java           | 279 -------
 .../jackrabbit/rmi/client/ClientWorkspace.java     | 299 --------
 .../jackrabbit/rmi/client/ClientXASession.java     | 146 ----
 .../rmi/client/DefaultContentHandler.java          | 176 -----
 .../jackrabbit/rmi/client/LocalAdapterFactory.java | 447 ------------
 .../rmi/client/RemoteRepositoryException.java      |  44 --
 .../rmi/client/RemoteRuntimeException.java         |  42 --
 .../rmi/client/SafeClientRepository.java           | 222 ------
 .../rmi/client/SerializingContentHandler.java      | 441 ------------
 .../rmi/client/iterator/ClientIterator.java        | 222 ------
 .../rmi/client/iterator/ClientNodeIterator.java    |  72 --
 .../client/iterator/ClientNodeTypeIterator.java    |  66 --
 .../client/iterator/ClientPropertyIterator.java    |  73 --
 .../rmi/client/iterator/ClientRowIterator.java     |  70 --
 .../rmi/client/iterator/ClientVersionIterator.java |  73 --
 .../rmi/client/iterator/package-info.java          |  18 -
 .../apache/jackrabbit/rmi/client/package-info.java |  18 -
 .../rmi/client/principal/ClientGroup.java          |  91 ---
 .../rmi/client/principal/ClientPrincipal.java      |  66 --
 .../client/principal/ClientPrincipalIterator.java  |  43 --
 .../rmi/client/principal/package-info.java         |  18 -
 .../client/security/ClientAccessControlEntry.java  |  75 --
 .../client/security/ClientAccessControlList.java   |  87 ---
 .../security/ClientAccessControlManager.java       | 161 -----
 .../client/security/ClientAccessControlPolicy.java |  52 --
 .../ClientAccessControlPolicyIterator.java         |  50 --
 .../rmi/client/security/ClientPrivilege.java       | 113 ---
 .../rmi/client/security/package-info.java          |  18 -
 .../rmi/iterator/ArrayEventIterator.java           |  46 --
 .../rmi/iterator/ArrayEventListenerIterator.java   |  47 --
 .../jackrabbit/rmi/iterator/ArrayIterator.java     |  85 ---
 .../jackrabbit/rmi/iterator/package-info.java      |  18 -
 .../jackrabbit/JackrabbitClientAdapterFactory.java |  27 -
 .../jackrabbit/rmi/jackrabbit/package-info.java    |  18 -
 .../rmi/observation/ClientEventPoll.java           | 344 ---------
 .../apache/jackrabbit/rmi/observation/Queue.java   |  85 ---
 .../rmi/observation/ServerEventListenerProxy.java  | 146 ----
 .../jackrabbit/rmi/observation/package-info.java   |  18 -
 .../jackrabbit/rmi/remote/ArrayIterator.java       | 104 ---
 .../jackrabbit/rmi/remote/BufferIterator.java      | 109 ---
 .../rmi/remote/RemoteEventCollection.java          | 129 ----
 .../apache/jackrabbit/rmi/remote/RemoteItem.java   | 147 ----
 .../rmi/remote/RemoteItemDefinition.java           | 109 ---
 .../jackrabbit/rmi/remote/RemoteIterator.java      |  71 --
 .../apache/jackrabbit/rmi/remote/RemoteLock.java   | 133 ----
 .../jackrabbit/rmi/remote/RemoteLockManager.java   |  50 --
 .../rmi/remote/RemoteNamespaceRegistry.java        | 118 ---
 .../apache/jackrabbit/rmi/remote/RemoteNode.java   | 745 -------------------
 .../rmi/remote/RemoteNodeDefinition.java           |  96 ---
 .../jackrabbit/rmi/remote/RemoteNodeType.java      | 292 --------
 .../rmi/remote/RemoteNodeTypeManager.java          | 106 ---
 .../rmi/remote/RemoteObservationManager.java       | 106 ---
 .../jackrabbit/rmi/remote/RemoteProperty.java      | 142 ----
 .../rmi/remote/RemotePropertyDefinition.java       | 121 ----
 .../apache/jackrabbit/rmi/remote/RemoteQuery.java  | 119 ---
 .../jackrabbit/rmi/remote/RemoteQueryManager.java  |  75 --
 .../jackrabbit/rmi/remote/RemoteQueryResult.java   |  74 --
 .../jackrabbit/rmi/remote/RemoteRepository.java    | 161 -----
 .../apache/jackrabbit/rmi/remote/RemoteRow.java    | 117 ---
 .../jackrabbit/rmi/remote/RemoteSession.java       | 464 ------------
 .../jackrabbit/rmi/remote/RemoteVersion.java       | 121 ----
 .../rmi/remote/RemoteVersionHistory.java           | 246 -------
 .../rmi/remote/RemoteVersionManager.java           | 109 ---
 .../jackrabbit/rmi/remote/RemoteWorkspace.java     | 200 ------
 .../jackrabbit/rmi/remote/RemoteXASession.java     |  88 ---
 .../jackrabbit/rmi/remote/SerializableXid.java     |  73 --
 .../apache/jackrabbit/rmi/remote/package-info.java |  18 -
 .../rmi/remote/principal/RemoteGroup.java          |  57 --
 .../rmi/remote/principal/RemotePrincipal.java      |  53 --
 .../rmi/remote/principal/package-info.java         |  18 -
 .../remote/security/RemoteAccessControlEntry.java  |  59 --
 .../remote/security/RemoteAccessControlList.java   |  53 --
 .../security/RemoteAccessControlManager.java       |  93 ---
 .../remote/security/RemoteAccessControlPolicy.java |  48 --
 .../rmi/remote/security/RemotePrivilege.java       |  71 --
 .../rmi/remote/security/package-info.java          |  18 -
 .../AbstractRemoteRepositoryFactory.java           |  71 --
 .../rmi/repository/JNDIRemoteRepository.java       |  75 --
 .../repository/JNDIRemoteRepositoryFactory.java    |  89 ---
 .../jackrabbit/rmi/repository/ProxyRepository.java | 250 -------
 .../rmi/repository/RMIRemoteRepository.java        |  56 --
 .../rmi/repository/RMIRemoteRepositoryFactory.java |  77 --
 .../rmi/repository/RepositoryFactory.java          |  37 -
 .../rmi/repository/RmiRepositoryFactory.java       | 175 -----
 .../rmi/repository/URLRemoteRepository.java        |  71 --
 .../rmi/repository/URLRemoteRepositoryFactory.java |  92 ---
 .../jackrabbit/rmi/repository/package-info.java    |  18 -
 .../rmi/server/RemoteAdapterFactory.java           | 479 ------------
 .../rmi/server/ServerAdapterFactory.java           | 531 --------------
 .../rmi/server/ServerEventCollection.java          | 139 ----
 .../apache/jackrabbit/rmi/server/ServerItem.java   | 143 ----
 .../rmi/server/ServerItemDefinition.java           |  96 ---
 .../apache/jackrabbit/rmi/server/ServerLock.java   | 100 ---
 .../jackrabbit/rmi/server/ServerLockManager.java   | 108 ---
 .../rmi/server/ServerNamespaceRegistry.java        | 117 ---
 .../apache/jackrabbit/rmi/server/ServerNode.java   | 688 ------------------
 .../rmi/server/ServerNodeDefinition.java           |  87 ---
 .../jackrabbit/rmi/server/ServerNodeType.java      | 233 ------
 .../rmi/server/ServerNodeTypeManager.java          | 122 ----
 .../apache/jackrabbit/rmi/server/ServerObject.java | 263 -------
 .../rmi/server/ServerObservationManager.java       | 166 -----
 .../jackrabbit/rmi/server/ServerProperty.java      | 134 ----
 .../rmi/server/ServerPropertyDefinition.java       |  98 ---
 .../apache/jackrabbit/rmi/server/ServerQuery.java  | 112 ---
 .../jackrabbit/rmi/server/ServerQueryManager.java  | 104 ---
 .../jackrabbit/rmi/server/ServerQueryResult.java   |  78 --
 .../jackrabbit/rmi/server/ServerRepository.java    | 143 ----
 .../apache/jackrabbit/rmi/server/ServerRow.java    | 136 ----
 .../jackrabbit/rmi/server/ServerSession.java       | 353 ---------
 .../jackrabbit/rmi/server/ServerVersion.java       | 157 ----
 .../rmi/server/ServerVersionHistory.java           | 215 ------
 .../rmi/server/ServerVersionManager.java           | 278 -------
 .../jackrabbit/rmi/server/ServerWorkspace.java     | 242 -------
 .../jackrabbit/rmi/server/ServerXASession.java     | 134 ----
 .../rmi/server/iterator/ServerIterator.java        | 142 ----
 .../rmi/server/iterator/ServerNodeIterator.java    |  59 --
 .../server/iterator/ServerNodeTypeIterator.java    |  59 --
 .../server/iterator/ServerPropertyIterator.java    |  59 --
 .../rmi/server/iterator/ServerRowIterator.java     |  59 --
 .../rmi/server/iterator/ServerVersionIterator.java |  59 --
 .../rmi/server/iterator/package-info.java          |  18 -
 .../jackrabbit/rmi/server/jmx/JCRServer.java       | 170 -----
 .../jackrabbit/rmi/server/jmx/JCRServerMBean.java  |  54 --
 .../jackrabbit/rmi/server/jmx/package-info.java    |  18 -
 .../apache/jackrabbit/rmi/server/package-info.java |  18 -
 .../rmi/server/principal/ServerGroup.java          |  92 ---
 .../rmi/server/principal/ServerPrincipal.java      |  54 --
 .../server/principal/ServerPrincipalIterator.java  |  42 --
 .../rmi/server/principal/package-info.java         |  18 -
 .../server/security/ServerAccessControlEntry.java  |  51 --
 .../server/security/ServerAccessControlList.java   |  83 ---
 .../security/ServerAccessControlManager.java       |  89 ---
 .../server/security/ServerAccessControlPolicy.java |  44 --
 .../ServerAccessControlPolicyIterator.java         |  61 --
 .../rmi/server/security/ServerPrivilege.java       |  64 --
 .../rmi/server/security/package-info.java          |  18 -
 .../apache/jackrabbit/rmi/value/AbstractValue.java | 247 -------
 .../apache/jackrabbit/rmi/value/BinaryValue.java   | 122 ----
 .../apache/jackrabbit/rmi/value/BooleanValue.java  |  67 --
 .../org/apache/jackrabbit/rmi/value/DateValue.java | 209 ------
 .../apache/jackrabbit/rmi/value/DecimalValue.java  | 117 ---
 .../apache/jackrabbit/rmi/value/DoubleValue.java   | 106 ---
 .../org/apache/jackrabbit/rmi/value/LongValue.java |  95 ---
 .../org/apache/jackrabbit/rmi/value/NameValue.java |  62 --
 .../org/apache/jackrabbit/rmi/value/PathValue.java |  62 --
 .../jackrabbit/rmi/value/ReferenceValue.java       |  63 --
 .../jackrabbit/rmi/value/SerialValueFactory.java   | 254 -------
 .../jackrabbit/rmi/value/SerializableBinary.java   | 202 ------
 .../apache/jackrabbit/rmi/value/StringValue.java   | 242 -------
 .../apache/jackrabbit/rmi/value/package-info.java  |  18 -
 .../jackrabbit/rmi/client/iterator/package.html    |  19 -
 .../org/apache/jackrabbit/rmi/client/package.html  |  76 --
 .../apache/jackrabbit/rmi/iterator/package.html    |  26 -
 .../apache/jackrabbit/rmi/observation/package.html |  71 --
 .../org/apache/jackrabbit/rmi/remote/package.html  |  35 -
 .../jackrabbit/rmi/server/iterator/package.html    |  19 -
 .../org/apache/jackrabbit/rmi/server/package.html  |  80 ---
 .../org/apache/jackrabbit/rmi/value/package.html   |  30 -
 .../org/apache/jackrabbit/rmi/xml/package.html     |  31 -
 .../META-INF/services/javax.jcr.RepositoryFactory  |  16 -
 .../src/main/resources/jackrabbit-rmi-service.xml  |  41 --
 .../org/apache/jackrabbit/rmi/ConformanceTest.java |  39 -
 .../apache/jackrabbit/rmi/RepositoryStubImpl.java  | 108 ---
 .../src/test/resources/logback-test.xml            |  31 -
 .../test/resources/repositoryStubImpl.properties   |  17 -
 pom.xml                                            |   1 -
 194 files changed, 25636 deletions(-)

diff --git a/jackrabbit-jcr-rmi/HEADER.txt b/jackrabbit-jcr-rmi/HEADER.txt
deleted file mode 100644
index ae6f28c4a..000000000
--- a/jackrabbit-jcr-rmi/HEADER.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
diff --git a/jackrabbit-jcr-rmi/README.txt b/jackrabbit-jcr-rmi/README.txt
deleted file mode 100644
index 5cd4cf2f7..000000000
--- a/jackrabbit-jcr-rmi/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-===================================================
-Apache Jackrabbit JCR-RMI
-===================================================
-
-RMI support is deprecated and will be removed in a future version of Jackrabbit; see https://issues.apache.org/jira/browse/JCR-4972 for more information.
-
diff --git a/jackrabbit-jcr-rmi/checkstyle.xml b/jackrabbit-jcr-rmi/checkstyle.xml
deleted file mode 100644
index 33678aa89..000000000
--- a/jackrabbit-jcr-rmi/checkstyle.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-<?xml version="1.0"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-  -->
-  
-<!DOCTYPE module PUBLIC
-    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
-    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
-
-<!--
-  Checkstyle checks configured for Maven.
--->
-
-<module name="Checker">
-
-    <!-- Checks that a package.html file exists for each package.     -->
-    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
-    <module name="PackageHtml"/>
-
-    <!-- Checks whether files end with a new line.                        -->
-    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
-    <module name="NewlineAtEndOfFile"/>
-
-    <!-- Checks that property files contain the same keys.         -->
-    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
-    <module name="Translation"/>
-
-    <module name="TreeWalker">
-
-        <property name="cacheFile" value="${checkstyle.cache.file}"/>
-
-        <!-- ************************************************************** -->
-        <!-- Checks that are different from the sun coding conventions ones -->
-        <!-- ************************************************************** -->
-
-        <module name="Header">
-            <property name="headerFile" value="${basedir}/HEADER.txt"/>
-        </module>
-        <!-- <property name="tabWidth" value="4"/> -->
-        <module name="LeftCurly">
-          <property name="option" value="eol"/>
-        </module>
-        <module name="LineLength">
-          <property name="max" value="132"/>
-          <property name="ignorePattern" value="\* \$"/>
-        </module>
-        <module name="MethodLength">
-          <property name="max" value="175"/>
-        </module>
-        <module name="ConstantName">
-          <property name="format" value="log|^[a-zA-Z][a-zA-Z0-9_]*$"/>
-        </module>
-
-        <!-- ************************************************************** -->
-        <!-- Default Sun coding conventions checks                          -->
-        <!-- ************************************************************** -->
-
-        <!-- Checks for Javadoc comments.                     -->
-        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
-        <module name="JavadocMethod"/>
-        <module name="JavadocType"/>
-        <module name="JavadocVariable"/>
-
-        <!-- Checks for Naming Conventions.                  -->
-        <!-- See http://checkstyle.sf.net/config_naming.html -->
-        <module name="LocalFinalVariableName"/>
-        <module name="LocalVariableName"/>
-        <module name="MethodName"/>
-        <module name="PackageName"/>
-        <module name="ParameterName"/>
-        <module name="StaticVariableName"/>
-        <module name="TypeName"/>
-        <module name="MemberName"/>
-
-        <!-- Checks for imports                              -->
-        <!-- See http://checkstyle.sf.net/config_import.html -->
-        <module name="AvoidStarImport"/>
-        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
-        <module name="RedundantImport"/>
-        <module name="UnusedImports"/>
-
-
-        <!-- Checks for Size Violations.                    -->
-        <!-- See http://checkstyle.sf.net/config_sizes.html -->
-        <module name="FileLength"/>
-        <module name="ParameterNumber"/>
-
-
-        <!-- Checks for whitespace                               -->
-        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
-        <module name="EmptyForIteratorPad"/>
-        <module name="NoWhitespaceAfter"/>
-        <module name="NoWhitespaceBefore"/>
-        <module name="OperatorWrap"/>
-        <module name="TabCharacter"/>
-        <module name="WhitespaceAfter"/>
-        <module name="WhitespaceAround"/>
-
-
-        <!-- Modifier Checks                                    -->
-        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
-        <module name="ModifierOrder"/>
-        <module name="RedundantModifier"/>
-
-
-        <!-- Checks for blocks. You know, those {}'s         -->
-        <!-- See http://checkstyle.sf.net/config_blocks.html -->
-        <module name="AvoidNestedBlocks"/>     
-        <module name="NeedBraces"/>
-
-        <!-- Checks for common coding problems               -->
-        <!-- See http://checkstyle.sf.net/config_coding.html -->
-        <module name="AvoidInlineConditionals"/>
-        <module name="DoubleCheckedLocking"/>
-        <module name="EqualsHashCode"/>
-        <module name="IllegalInstantiation"/>
-        <module name="InnerAssignment"/>
-        <module name="MissingSwitchDefault"/>
-        <module name="RedundantThrows">
-            <property name="allowUnchecked" value="true"/>   <!-- DISABLED -->
-            <property name="allowSubclasses" value="true"/>   <!-- DISABLED -->
-        </module>
-        <module name="SimplifyBooleanExpression"/>
-        <module name="SimplifyBooleanReturn"/>
-
-        <!-- Checks for class design                         -->
-        <!-- See http://checkstyle.sf.net/config_design.html -->
-        <module name="DesignForExtension">
-            <property name="severity" value="ignore"/>   <!-- DISABLED -->
-        </module>
-        <module name="HideUtilityClassConstructor"/>
-        <module name="InterfaceIsType"/>
-        <module name="VisibilityModifier"/>
-
-
-        <!-- Miscellaneous other checks.                   -->
-        <!-- See http://checkstyle.sf.net/config_misc.html -->
-        <module name="ArrayTypeStyle"/>
-        <module name="FinalParameters">
-            <property name="severity" value="ignore"/>   <!-- DISABLED -->
-        </module>
-        <module name="GenericIllegalRegexp">
-            <property name="format" value="\s+$"/>
-            <property name="message" value="Line has trailing spaces."/>
-        </module>
-        <module name="TodoComment"/>
-        <module name="UpperEll"/>
-
-    </module>
-
-</module>
diff --git a/jackrabbit-jcr-rmi/pom.xml b/jackrabbit-jcr-rmi/pom.xml
deleted file mode 100644
index 1640fcbf8..000000000
--- a/jackrabbit-jcr-rmi/pom.xml
+++ /dev/null
@@ -1,583 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-  -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.jackrabbit</groupId>
-    <artifactId>jackrabbit-parent</artifactId>
-    <version>2.21.24-SNAPSHOT</version>
-    <relativePath>../jackrabbit-parent/pom.xml</relativePath>
-  </parent>
-
-  <!-- =================================================================== -->
-  <!-- P R O J E C T  D E S C R I P T I O N                                -->
-  <!-- =================================================================== -->
-  <artifactId>jackrabbit-jcr-rmi</artifactId>
-  <packaging>bundle</packaging>
-
-  <name>Jackrabbit JCR-RMI</name>
-  <description>
-    JCR-RMI is a transparent Remote Method Invocation (RMI) layer for the
-    Content Repository for Java Technology API (JCR). The layer makes it
-    possible to remotely access JCR content repositories.
-  </description>
-
-  <!-- =================================================================== -->
-  <!-- B U I L D   S E T T I N G S                                         -->
-  <!-- =================================================================== -->
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <Bundle-Category>jcr,jackrabbit</Bundle-Category>
-            <Bundle-DocURL>http://jackrabbit.apache.org/</Bundle-DocURL>
-            <!-- optional resolution XA -->
-            <Import-Package>
-              javax.transaction.xa;resolution:=optional,*
-            </Import-Package>
-            <!-- inline RangeIterator adapt to not add library dependency -->
-            <Embed-Dependency>
-              jackrabbit-jcr-commons;inline=org/apache/jackrabbit/commons/iterator/RangeIteratorAdapter*
-            </Embed-Dependency>
-          </instructions>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <configuration>
-          <excludes>
-            <exclude>src/main/javadoc/**/*.uxf</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-    <pluginManagement>
-    	<plugins>
-    		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-    		<plugin>
-    			<groupId>org.eclipse.m2e</groupId>
-    			<artifactId>lifecycle-mapping</artifactId>
-    			<version>1.0.0</version>
-    			<configuration>
-    				<lifecycleMappingMetadata>
-    					<pluginExecutions>
-    						<pluginExecution>
-    							<pluginExecutionFilter>
-    								<groupId>
-    									org.apache.maven.plugins
-    								</groupId>
-    								<artifactId>
-    									maven-antrun-plugin
-    								</artifactId>
-    								<versionRange>[3,)</versionRange>
-    								<goals>
-    									<goal>run</goal>
-    								</goals>
-    							</pluginExecutionFilter>
-    							<action>
-    								<ignore />
-    							</action>
-    						</pluginExecution>
-    					</pluginExecutions>
-    				</lifecycleMappingMetadata>
-    			</configuration>
-    		</plugin>
-    	</plugins>
-    </pluginManagement>
-  </build>
-
-  <profiles>
-    <profile>
-      <id>integrationTesting</id>
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <argLine>${test.opts}</argLine>
-              <systemProperties>
-                <property>
-                  <name>jackrabbit.test.integration</name>
-                  <value>true</value>
-                </property>
-                <property>
-                  <name>known.issues</name>
-                  <value>
-org.apache.jackrabbit.test.api.ShareableNodeTest
-org.apache.jackrabbit.test.api.SetValueValueFormatExceptionTest#testNodeNotReferenceable
-
-org.apache.jackrabbit.test.api.NameTest#testExpandedNameValue
-org.apache.jackrabbit.test.api.NameTest#testExpandedNameValueProperty
-
-org.apache.jackrabbit.test.api.NodeRemoveMixinTest#testNotAssigned
-org.apache.jackrabbit.test.api.ValueFactoryTest#testValueFormatException
-
-org.apache.jackrabbit.test.api.GetWeakReferencesTest#testMultiValues
-org.apache.jackrabbit.test.api.GetWeakReferencesTest#testSingleValue
-
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testEmptyNodeDefinitionTemplate
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testEmptyNodeTypeTemplate
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testEmptyPropertyDefinitionTemplate
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testInvalidJCRNames
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testNewNodeTypeTemplate
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testNodeDefinitionTemplate
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testNonEmptyNodeTypeTemplate
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testPropertyDefinitionTemplate
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testRegisterNodeType
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testRegisterNodeTypes
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testResidualNames
-org.apache.jackrabbit.test.api.nodetype.NodeTypeCreationTest#testSetDefaultValues
-
-org.apache.jackrabbit.test.api.observation.GetUserDataTest#testSave
-org.apache.jackrabbit.test.api.observation.GetUserDataTest#testVersioning
-org.apache.jackrabbit.test.api.observation.GetUserDataTest#testWorkspaceOperation
-org.apache.jackrabbit.test.api.observation.NodeReorderTest#testNodeReorderMove
-
-org.apache.jackrabbit.test.api.PathTest#testResolvedIdentifierBasedPropertyValue
-
-org.apache.jackrabbit.test.api.query.CreateQueryTest#testUnknownQueryLanguage
-org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefMultiPropWithNodeStar
-org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefMultiPropWithNodeTest
-org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefSinglePropWithNodeStar
-org.apache.jackrabbit.test.api.query.DerefQueryLevel1Test#testDerefSinglePropWithNodeTest
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTest
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTestAnyNode
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTestAnyNodeNtBase
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTestAnyNodeSomeNT
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTest
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTestNtBase
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTestSomeNT
-org.apache.jackrabbit.test.api.query.ElementTest#testElementTestNameTestSomeNTWithSNS
-org.apache.jackrabbit.test.api.query.GetLanguageTest#testGetLanguage
-org.apache.jackrabbit.test.api.query.GetLanguageTest#testJCRQOM
-org.apache.jackrabbit.test.api.query.GetLanguageTest#testJCRSQL2
-org.apache.jackrabbit.test.api.query.GetLanguageTest#testSQL
-org.apache.jackrabbit.test.api.query.GetPersistentQueryPathLevel1Test#testGetStoredQueryPath
-org.apache.jackrabbit.test.api.query.GetPersistentQueryPathTest#testGetPersistentQueryPath
-org.apache.jackrabbit.test.api.query.GetPropertyNamesTest#testGetPropertyNames
-org.apache.jackrabbit.test.api.query.GetStatementTest#testGetStatement
-org.apache.jackrabbit.test.api.query.GetSupportedQueryLanguagesTest#testGetSupportedQueryLanguages
-org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrder
-org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrderMillis
-org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrderNegativeTimeZone
-org.apache.jackrabbit.test.api.query.OrderByDateTest#testDateOrderPositiveTimeZone
-org.apache.jackrabbit.test.api.query.OrderByDecimalTest#testDecimal
-org.apache.jackrabbit.test.api.query.OrderByDoubleTest#testDoubleOrder1
-org.apache.jackrabbit.test.api.query.OrderByDoubleTest#testDoubleOrder2
-org.apache.jackrabbit.test.api.query.OrderByLengthTest#testLength
-org.apache.jackrabbit.test.api.query.OrderByLocalNameTest#testLocalName
-org.apache.jackrabbit.test.api.query.OrderByLongTest#testIntegerOrder
-org.apache.jackrabbit.test.api.query.OrderByLowerCaseTest#testLowerCase
-org.apache.jackrabbit.test.api.query.OrderByMultiTypeTest#testMultipleOrder
-org.apache.jackrabbit.test.api.query.OrderByNameTest#testName
-org.apache.jackrabbit.test.api.query.OrderByStringTest#testStringOrder
-org.apache.jackrabbit.test.api.query.OrderByUpperCaseTest#testLowerCase
-org.apache.jackrabbit.test.api.query.OrderByURITest#testURI
-org.apache.jackrabbit.test.api.query.PredicatesTest#testAnd
-org.apache.jackrabbit.test.api.query.PredicatesTest#testCombinedAnd
-org.apache.jackrabbit.test.api.query.PredicatesTest#testCombinedOr
-org.apache.jackrabbit.test.api.query.PredicatesTest#testEquality
-org.apache.jackrabbit.test.api.query.PredicatesTest#testOr
-org.apache.jackrabbit.test.api.query.qom.AndConstraintTest#testAnd
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testBindVariableNames
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testBoolean
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testDate
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testDecimal
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testDouble
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testIllegalArgumentException
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testLong
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testName
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testPath
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testReference
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testString
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testURI
-org.apache.jackrabbit.test.api.query.qom.BindVariableValueTest#testWeakReference
-org.apache.jackrabbit.test.api.query.qom.ChildNodeJoinConditionTest#testInnerJoin
-org.apache.jackrabbit.test.api.query.qom.ChildNodeJoinConditionTest#testLeftOuterJoin
-org.apache.jackrabbit.test.api.query.qom.ChildNodeJoinConditionTest#testRightOuterJoin
-org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testChildNode
-org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testChildNodes
-org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testChildNodesDoNotMatchSelector
-org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testNotASelectorName
-org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testPathDoesNotExist
-org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testRelativePath
-org.apache.jackrabbit.test.api.query.qom.ChildNodeTest#testSyntacticallyInvalidPath
-org.apache.jackrabbit.test.api.query.qom.ColumnTest#testColumnNames
-org.apache.jackrabbit.test.api.query.qom.ColumnTest#testExpandColumnsForNodeType
-org.apache.jackrabbit.test.api.query.qom.ColumnTest#testMultiColumn
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeJoinConditionTest#testInnerJoin
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeJoinConditionTest#testLeftOuterJoin
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeJoinConditionTest#testRightOuterJoin
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testDescendantNode
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testDescendantNodes
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testDescendantNodesDoNotMatchSelector
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testNotASelectorName
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testPathDoesNotExist
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testRelativePath
-org.apache.jackrabbit.test.api.query.qom.DescendantNodeTest#testSyntacticallyInvalidPath
-org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testInnerJoin1
-org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testInnerJoin2
-org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testLeftOuterJoin1
-org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testLeftOuterJoin2
-org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testRightOuterJoin1
-org.apache.jackrabbit.test.api.query.qom.EquiJoinConditionTest#testRightOuterJoin2
-org.apache.jackrabbit.test.api.query.qom.FullTextSearchScoreTest#testConstraint
-org.apache.jackrabbit.test.api.query.qom.FullTextSearchScoreTest#testOrdering
-org.apache.jackrabbit.test.api.query.qom.GetQueryTest#testGetQuery
-org.apache.jackrabbit.test.api.query.qom.GetQueryTest#testInvalidQueryException
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testBinaryLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testBooleanLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testDateLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testDecimalLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testDoubleLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthBinaryLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthBooleanLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthDateLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthDecimalLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthDoubleLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthNameLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthPathLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthReferenceLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthStringLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthURILiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLengthWeakReferenceLiteral
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testLongLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testNameLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testPathLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testReferenceLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testStringLength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testURILength
-org.apache.jackrabbit.test.api.query.qom.LengthTest#testWeakReferenceLength
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testBinaryLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testBooleanLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testDateLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testDecimalLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testDoubleLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testEqualTo
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testGreaterThan
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testGreaterThanOrEqualTo
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLessThan
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLessThanOrEqualTo
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLike
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testLongLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testNameLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testNotEqualTo
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testPathLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testReferenceLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testStringLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testStringLiteralInvalidName
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testURILiteral
-org.apache.jackrabbit.test.api.query.qom.NodeLocalNameTest#testWeakReferenceLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testBinaryLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testBooleanLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testDateLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testDecimalLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testDoubleLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testEqualTo
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testLongLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testNameLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testNotEqualTo
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testPathLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testReferenceLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testStringLiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testStringLiteralInvalidName
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testURILiteral
-org.apache.jackrabbit.test.api.query.qom.NodeNameTest#testWeakReferenceLiteral
-org.apache.jackrabbit.test.api.query.qom.NotConstraintTest#testNot
-org.apache.jackrabbit.test.api.query.qom.OrConstraintTest#testOr
-org.apache.jackrabbit.test.api.query.qom.OrderingTest#testMultipleSelectors
-org.apache.jackrabbit.test.api.query.qom.PropertyExistenceTest#testPropertyExistence
-org.apache.jackrabbit.test.api.query.qom.PropertyValueTest#testPropertyExistence
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testAnd
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testBindVariableValue
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testChildNode
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testChildNodeJoinCondition
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testChildNodeWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumn
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumnAllProperties
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumnWithColumnName
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testColumnWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testComparison
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQuery
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSource
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSourceWithConstraint
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSourceWithConstraintAndOrdering
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryFromSourceWithConstraintOrderingAndColumn
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryWithConstraint
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryWithConstraintAndOrdering
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testCreateQueryWithConstraintOrderingAndColumn
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testDescendantNode
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testDescendantNodeJoinCondition
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testDescendantNodeWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testEquiJoinCondition
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearch
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchAllProperties
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchScore
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchScoreWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testFullTextSearchWithBindVariableValue
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testJoin
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testLength
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testLiteral
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testLowerCase
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeLocalName
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeLocalNameWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeName
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNodeNameWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testNot
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testOr
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testOrderingAscending
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testOrderingDescending
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyExistence
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyExistenceWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyValue
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testPropertyValueWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNode
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNodeJoinCondition
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNodeJoinConditionWithPath
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSameNodeWithSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSelector
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testSelectorWithName
-org.apache.jackrabbit.test.api.query.qom.QueryObjectModelFactoryTest#testUpperCase
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetNode
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetNodeWithSelector
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetPath
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetPathWithSelector
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetScore
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetScoreWithSelector
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetValue
-org.apache.jackrabbit.test.api.query.qom.RowTest#testGetValues
-org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testInnerJoin
-org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testInnerJoinWithPath
-org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testLeftOuterJoin
-org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testLeftOuterJoinWithPath
-org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testRightOuterJoin
-org.apache.jackrabbit.test.api.query.qom.SameNodeJoinConditionTest#testRightOuterJoinWithPath
-org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testChildNodesDoNotMatchSelector
-org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testNotASelectorName
-org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testPathDoesNotExist
-org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testRelativePath
-org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testSameNode
-org.apache.jackrabbit.test.api.query.qom.SameNodeTest#testSyntacticallyInvalidPath
-org.apache.jackrabbit.test.api.query.qom.SelectorTest#testDuplicateNodeType
-org.apache.jackrabbit.test.api.query.qom.SelectorTest#testSelector
-org.apache.jackrabbit.test.api.query.qom.SelectorTest#testSyntacticallyInvalidName
-org.apache.jackrabbit.test.api.query.qom.SelectorTest#testUnknownNodeType
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testLength
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testLowerCaseTwice
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testLowerUpperCase
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testNodeLocalName
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testNodeName
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testPropertyValue
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testUpperCaseTwice
-org.apache.jackrabbit.test.api.query.qom.UpperLowerCaseTest#testUpperLowerCase
-org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testGetPosition
-org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testGetPositionEmptyIterator
-org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testGetSize
-org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testNoSuchElementException
-org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest#testSkip
-org.apache.jackrabbit.test.api.query.SetLimitTest#testSetLimit
-org.apache.jackrabbit.test.api.query.SetOffsetTest#testSetOffset
-org.apache.jackrabbit.test.api.query.SimpleSelectionTest#testSingleProperty
-org.apache.jackrabbit.test.api.query.SQLJcrPathTest#testJcrPath
-org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoin
-org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoinFilterPrimaryType
-org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoinNtBase
-org.apache.jackrabbit.test.api.query.SQLJoinTest#testJoinSNS
-org.apache.jackrabbit.test.api.query.SQLOrderByTest#testOrderByAscending
-org.apache.jackrabbit.test.api.query.SQLOrderByTest#testOrderByDefault
-org.apache.jackrabbit.test.api.query.SQLOrderByTest#testOrderByDescending
-org.apache.jackrabbit.test.api.query.SQLPathTest#testChildAxisLeaf
-org.apache.jackrabbit.test.api.query.SQLPathTest#testChildAxisRoot
-org.apache.jackrabbit.test.api.query.SQLPathTest#testChildAxisTestRoot
-org.apache.jackrabbit.test.api.query.SQLPathTest#testDescendantLeaf
-org.apache.jackrabbit.test.api.query.SQLPathTest#testDescendantSelfTestRoot
-org.apache.jackrabbit.test.api.query.SQLPathTest#testDescendantTestRoot
-org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testFullTextSearch
-org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testMultiValueSearch
-org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testPathColumn
-org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testRange
-org.apache.jackrabbit.test.api.query.SQLQueryLevel2Test#testScoreColumn
-org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTest
-org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTestContains
-org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTestMultiNodes
-org.apache.jackrabbit.test.api.query.TextNodeTest#testTextNodeTestWithPosition
-org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderFirstFunction
-org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderLastFunction
-org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderPositionFunction
-org.apache.jackrabbit.test.api.query.XPathDocOrderTest#testDocOrderPositionIndex
-org.apache.jackrabbit.test.api.query.XPathJcrPathTest#testJcrPath
-org.apache.jackrabbit.test.api.query.XPathOrderByTest#testOrderBy
-org.apache.jackrabbit.test.api.query.XPathOrderByTest#testOrderByAscending
-org.apache.jackrabbit.test.api.query.XPathOrderByTest#testOrderByDescending
-org.apache.jackrabbit.test.api.query.XPathPosIndexTest#testDocOrderIndexedNotation
-org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testFullTextSearch
-org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testMultiValueSearch
-org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testPathColumn
-org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testRange
-org.apache.jackrabbit.test.api.query.XPathQueryLevel2Test#testScoreColumn
-
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetIllegalPolicy
-org.apache.jackrabbit.test.api.security.RSessionAccessControlPolicyTest#testSetInvalidPolicy
-
-org.apache.jackrabbit.test.api.SerializationTest#testLockExceptionSessionWithHandler
-org.apache.jackrabbit.test.api.SerializationTest#testLockExceptionWorkspaceWithHandler
-org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileChildSessionContentHandler
-org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileChildWorkspaceContentHandler
-org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileParentSessionContentHandler
-org.apache.jackrabbit.test.api.SerializationTest#testVersioningExceptionFileParentWorkspaceContentHandler
-
-org.apache.jackrabbit.test.api.SessionTest#testHasCapability
-
-org.apache.jackrabbit.test.api.version.CopyTest#testCopy
-org.apache.jackrabbit.test.api.version.VersionHistoryTest#testGetAllFrozenNodes
-
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetPolicy
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetAllPolicies
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testGetPolicyAfterSet
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testResetPolicy
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetPolicyIsTransient
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testGetPolicyAfterSave
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testNodeIsModifiedAfterSecondSetPolicy
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testNodeIsModifiedAfterSetPolicy
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testRemovePolicy
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testRemovePolicyIsTransient
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testNodeIsModifiedAfterRemovePolicy
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testSetPolicyOnNewNode
-org.apache.jackrabbit.test.api.security.AccessControlPolicyTest#testRemoveTransientlyAddedPolicy
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntry
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAggregatePrivilege
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAggregatedPrivilegesSeparately
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddPrivilegesPresentInEntries
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryAndSetPolicy
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryIsTransient
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryInvalidPrincipal
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryEmptyPrivilegeArray
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryInvalidPrivilege
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveAddedAccessControlEntry
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveAccessControlEntryAndSetPolicy
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveAccessControlEntryIsTransient
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testRemoveIllegalAccessControlEntry
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryTwice
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testAddAccessControlEntryAgain
-org.apache.jackrabbit.test.api.security.AccessControlListTest#testExtendPrivileges
-org.apache.jackrabbit.test.api.security.RSessionAccessControlPolicyTest#testSetPolicy
-<!-- JCR-3206 -->
-org.apache.jackrabbit.test.api.observation.EventJournalTest
-                  </value>
-                </property>
-                <property>
-                  <name>derby.system.durability</name>
-                  <value>test</value>
-                </property>
-                <property>
-                  <name>derby.storage.fileSyncTransactionLog</name>
-                  <value>true</value>
-                </property>
-                <property>
-                  <name>derby.stream.error.file</name>
-                  <value>target/derby.log</value>
-                </property>
-              </systemProperties>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
-  <!-- =================================================================== -->
-  <!-- D E P E N D E N C I E S                                             -->
-  <!-- =================================================================== -->
-  <dependencies>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.annotation</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <!-- Hard dependencies -->
-    <dependency>
-      <groupId>javax.jcr</groupId>
-      <artifactId>jcr</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    <!--
-      We use the RangeIteratorAdapter but include it in the library thus
-      users of the jackrabbit-jcr-rmi library do not need to get the
-      jackrabbit-jcr-commons library
-    -->
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>jackrabbit-jcr-commons</artifactId>
-        <version>${project.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    
-    <!-- Oak Jackrabbit API extensions -->
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>oak-jackrabbit-api</artifactId>
-      <version>${oak-jackrabbit-api.version.implemented}</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>jackrabbit-core</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.jackrabbit</groupId>
-      <artifactId>jackrabbit-jcr-tests</artifactId>
-      <version>${project.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>ch.qos.logback</groupId>
-      <artifactId>logback-classic</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derby</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.derby</groupId>
-      <artifactId>derbytools</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java
deleted file mode 100644
index 1b4c329c9..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/BrokenRemoteRepository.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Credentials;
-import javax.jcr.Value;
-
-import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-import org.apache.jackrabbit.rmi.remote.RemoteSession;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Dummy remote repository instance that throws a {@link RemoteException}
- * whenever any method is invoked. Used as a sentinel object by the
- * {@link SafeClientRepository} class.
- */
-@Deprecated(forRemoval = true) public class BrokenRemoteRepository implements RemoteRepository {
-
-    /**
-     * The remote exception thrown by methods of this instance.
-     */
-    private final RemoteException exception;
-
-    /**
-     * Creates a remote repository whose methods throw the given
-     * exception.
-     *
-     * @param exception remote exception
-     */
-    public BrokenRemoteRepository(RemoteException exception) {
-        this.exception = exception;
-    }
-
-    /**
-     * Creates a remote repository whose methods trow a remote
-     * exception with the given message.
-     *
-     * @param message exception message
-     */
-    public BrokenRemoteRepository(String message) {
-        this(new RemoteException(message));
-    }
-
-    /**
-     * Creates a remote repository whose methods throw a remote exception.
-     */
-    public BrokenRemoteRepository() {
-        this(new RemoteException());
-    }
-
-    //----------------------------------------------------< RemoteRepository >
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param key ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-    public String getDescriptor(String key) throws RemoteException {
-        throw exception;
-    }
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-    public String[] getDescriptorKeys() throws RemoteException {
-        throw exception;
-    }
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-    public RemoteSession login() throws RemoteException {
-        throw exception;
-    }
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param workspace ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-    public RemoteSession login(String workspace) throws RemoteException {
-        throw exception;
-    }
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param credentials ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-    public RemoteSession login(Credentials credentials) throws RemoteException {
-        throw exception;
-    }
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param workspace ignored
-     * @param credentials ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-    public RemoteSession login(Credentials credentials, String workspace)
-            throws RemoteException {
-        throw exception;
-    }
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param key ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-	public Value getDescriptorValue(String key) throws RemoteException {
-        throw exception;
-	}
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param key ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-	public Value[] getDescriptorValues(String key) throws RemoteException {
-        throw exception;
-	}
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param key ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-	public boolean isSingleValueDescriptor(String key) throws RemoteException {
-        throw exception;
-	}
-
-    /**
-     * Throws a {@link RemoteException}.
-     *
-     * @param key ignored
-     * @return nothing
-     * @throws RemoteException always thrown
-     */
-	public boolean isStandardDescriptor(String key) throws RemoteException {
-        throw exception;
-	}
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java
deleted file mode 100644
index 7b8c50eaa..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientAdapterFactory.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.security.Principal;
-import java.util.Iterator;
-
-import javax.jcr.Item;
-import javax.jcr.NamespaceRegistry;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
-import javax.jcr.Repository;
-import javax.jcr.Session;
-import javax.jcr.Workspace;
-import javax.jcr.lock.Lock;
-import javax.jcr.lock.LockManager;
-import javax.jcr.nodetype.ItemDefinition;
-import javax.jcr.nodetype.NodeDefinition;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.nodetype.NodeTypeIterator;
-import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.nodetype.PropertyDefinition;
-import javax.jcr.observation.ObservationManager;
-import javax.jcr.query.Query;
-import javax.jcr.query.QueryManager;
-import javax.jcr.query.QueryResult;
-import javax.jcr.query.Row;
-import javax.jcr.query.RowIterator;
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.AccessControlPolicyIterator;
-import javax.jcr.security.Privilege;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionHistory;
-import javax.jcr.version.VersionIterator;
-import javax.jcr.version.VersionManager;
-
-import org.apache.jackrabbit.rmi.client.iterator.ClientNodeIterator;
-import org.apache.jackrabbit.rmi.client.iterator.ClientNodeTypeIterator;
-import org.apache.jackrabbit.rmi.client.iterator.ClientPropertyIterator;
-import org.apache.jackrabbit.rmi.client.iterator.ClientRowIterator;
-import org.apache.jackrabbit.rmi.client.iterator.ClientVersionIterator;
-import org.apache.jackrabbit.rmi.client.principal.ClientGroup;
-import org.apache.jackrabbit.rmi.client.principal.ClientPrincipal;
-import org.apache.jackrabbit.rmi.client.principal.ClientPrincipalIterator;
-import org.apache.jackrabbit.rmi.client.security.ClientAccessControlEntry;
-import org.apache.jackrabbit.rmi.client.security.ClientAccessControlList;
-import org.apache.jackrabbit.rmi.client.security.ClientAccessControlManager;
-import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicy;
-import org.apache.jackrabbit.rmi.client.security.ClientAccessControlPolicyIterator;
-import org.apache.jackrabbit.rmi.client.security.ClientPrivilege;
-import org.apache.jackrabbit.rmi.remote.RemoteItem;
-import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteLock;
-import org.apache.jackrabbit.rmi.remote.RemoteLockManager;
-import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry;
-import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager;
-import org.apache.jackrabbit.rmi.remote.RemoteObservationManager;
-import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteQuery;
-import org.apache.jackrabbit.rmi.remote.RemoteQueryManager;
-import org.apache.jackrabbit.rmi.remote.RemoteQueryResult;
-import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-import org.apache.jackrabbit.rmi.remote.RemoteRow;
-import org.apache.jackrabbit.rmi.remote.RemoteSession;
-import org.apache.jackrabbit.rmi.remote.RemoteVersion;
-import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
-import org.apache.jackrabbit.rmi.remote.RemoteVersionManager;
-import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
-import org.apache.jackrabbit.rmi.remote.RemoteXASession;
-import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup;
-import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy;
-import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Default implementation of the
- * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory LocalAdapterFactory}
- * interface. This factory uses the client adapters defined in this
- * package as the default adapter implementations. Subclasses can
- * easily override or extend the default adapters by implementing the
- * corresponding factory methods.
- */
-@Deprecated(forRemoval = true) public class ClientAdapterFactory implements LocalAdapterFactory {
-
-    /**
-     * Creates and returns a {@link ClientRepository ClientRepository}
-     * instance.
-     *
-     * {@inheritDoc}
-     */
-    public Repository getRepository(RemoteRepository remote) {
-        return new ClientRepository(remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientSession ClientSession} instance.
-     * In case the remote session is transaction enabled, the returned session
-     * will be transaction enabled too through the {@link ClientXASession}.
-     *
-     * {@inheritDoc}
-     */
-    public Session getSession(Repository repository, RemoteSession remote) {
-        if (remote instanceof RemoteXASession) {
-            return new ClientXASession(
-                    repository, (RemoteXASession) remote, this);
-        } else {
-            return new ClientSession(repository, remote, this);
-        }
-    }
-
-    /**
-     * Creates and returns a {@link ClientWorkspace ClientWorkspace} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Workspace getWorkspace(Session session, RemoteWorkspace remote) {
-        return new ClientWorkspace(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a
-     * {@link ClientObservationManager ClientObservationManager} instance.
-     *
-     * {@inheritDoc}
-     */
-    public ObservationManager getObservationManager(Workspace workspace,
-            RemoteObservationManager remote) {
-        return new ClientObservationManager(workspace, remote);
-    }
-
-    /**
-     * Creates and returns a
-     * {@link ClientNamespaceRegistry ClientClientNamespaceRegistry} instance.
-     *
-     * {@inheritDoc}
-     */
-    public NamespaceRegistry getNamespaceRegistry(
-            RemoteNamespaceRegistry remote) {
-        return new ClientNamespaceRegistry(remote, this);
-    }
-
-    /**
-     * Creates and returns a
-     * {@link ClientNodeTypeManager ClienNodeTypeManager} instance.
-     *
-     * {@inheritDoc}
-     */
-    public NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote) {
-        return new ClientNodeTypeManager(remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientItem ClientItem} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Item getItem(Session session, RemoteItem remote) {
-        return new ClientItem(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientProperty ClientProperty} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Property getProperty(Session session, RemoteProperty remote) {
-        return new ClientProperty(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientNode ClientNode} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Node getNode(Session session, RemoteNode remote) {
-        return new ClientNode(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientVersion ClientVersion} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Version getVersion(Session session, RemoteVersion remote) {
-        return new ClientVersion(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientVersionHistory ClientVersionHistory}
-     * instance.
-     *
-     * {@inheritDoc}
-     */
-    public VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote) {
-        return new ClientVersionHistory(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientNodeType ClientNodeType} instance.
-     *
-     * {@inheritDoc}
-     */
-    public NodeType getNodeType(RemoteNodeType remote) {
-        return new ClientNodeType(remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientItemDefinition ClientItemDefinition} instance.
-     *
-     * {@inheritDoc}
-     */
-    public ItemDefinition getItemDef(RemoteItemDefinition remote) {
-        return new ClientItemDefinition(remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientNodeDefinition ClientNodeDefinition} instance.
-     *
-     * {@inheritDoc}
-     */
-    public NodeDefinition getNodeDef(RemoteNodeDefinition remote) {
-        return new ClientNodeDefinition(remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientPropertyDefinition ClientPropertyDefinition}
-     * instance.
-     *
-     * {@inheritDoc}
-     */
-    public PropertyDefinition getPropertyDef(RemotePropertyDefinition remote) {
-        return new ClientPropertyDefinition(remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientLock ClientLock} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Lock getLock(Session session, RemoteLock remote) {
-        return new ClientLock(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientQueryManager ClientQueryManager} instance.
-     *
-     * {@inheritDoc}
-     */
-    public QueryManager getQueryManager(
-            Session session, RemoteQueryManager remote) {
-        return new ClientQueryManager(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientQuery ClientQuery} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Query getQuery(Session session, RemoteQuery remote) {
-        return new ClientQuery(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientQueryResult ClientQueryResult} instance.
-     *
-     * {@inheritDoc}
-     */
-    public QueryResult getQueryResult(
-            Session session, RemoteQueryResult remote) {
-        return new ClientQueryResult(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientRow ClientRow} instance.
-     *
-     * {@inheritDoc}
-     */
-    public Row getRow(Session session, RemoteRow remote) {
-        return new ClientRow(session, remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientNodeIterator} instance.
-     * {@inheritDoc}
-     */
-    public NodeIterator getNodeIterator(
-            Session session, RemoteIterator remote) {
-        return new ClientNodeIterator(remote, session, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientPropertyIterator} instance.
-     * {@inheritDoc}
-     */
-    public PropertyIterator getPropertyIterator(
-            Session session, RemoteIterator remote) {
-        return new ClientPropertyIterator(remote, session, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientVersionIterator} instance.
-     * {@inheritDoc}
-     */
-    public VersionIterator getVersionIterator(
-            Session session, RemoteIterator remote) {
-        return new ClientVersionIterator(remote, session, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientNodeTypeIterator} instance.
-     * {@inheritDoc}
-     */
-    public NodeTypeIterator getNodeTypeIterator(RemoteIterator remote) {
-        return new ClientNodeTypeIterator(remote, this);
-    }
-
-    /**
-     * Creates and returns a {@link ClientRowIterator} instance.
-     * {@inheritDoc}
-     */
-    public RowIterator getRowIterator(Session session, RemoteIterator remote) {
-        return new ClientRowIterator(session, remote, this);
-    }
-
-    public LockManager getLockManager(
-            Session session, RemoteLockManager remote) {
-        return new ClientLockManager(session, remote, this);
-    }
-
-    public VersionManager getVersionManager(
-            Session session, RemoteVersionManager remote) {
-        return new ClientVersionManager(session, remote, this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessControlManager getAccessControlManager(
-            RemoteAccessControlManager remote) {
-        return new ClientAccessControlManager(remote, this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessControlPolicy getAccessControlPolicy(
-            RemoteAccessControlPolicy remote) {
-        if (remote instanceof RemoteAccessControlList) {
-            return new ClientAccessControlList(
-                (RemoteAccessControlList) remote, this);
-        }
-        return new ClientAccessControlPolicy(remote, this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessControlPolicy[] getAccessControlPolicy(
-            RemoteAccessControlPolicy[] remote) {
-        final AccessControlPolicy[] local = new AccessControlPolicy[remote.length];
-        for (int i = 0; i < local.length; i++) {
-            local[i] = getAccessControlPolicy(remote[i]);
-        }
-        return local;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessControlPolicyIterator getAccessControlPolicyIterator(
-            RemoteIterator remote) {
-        return new ClientAccessControlPolicyIterator(remote, this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessControlEntry getAccessControlEntry(
-            RemoteAccessControlEntry remote) {
-        return new ClientAccessControlEntry(remote, this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public AccessControlEntry[] getAccessControlEntry(
-            RemoteAccessControlEntry[] remote) {
-        final AccessControlEntry[] local = new AccessControlEntry[remote.length];
-        for (int i = 0; i < local.length; i++) {
-            local[i] = getAccessControlEntry(remote[i]);
-        }
-        return local;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Principal getPrincipal(RemotePrincipal remote) {
-        if (remote instanceof RemoteGroup) {
-            return new ClientGroup(remote, this);
-        }
-        return new ClientPrincipal(remote);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @SuppressWarnings("unchecked")
-    public Iterator<Principal> getPrincipalIterator(RemoteIterator remote) {
-        return new ClientPrincipalIterator(remote, this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Privilege getPrivilege(RemotePrivilege remote) {
-        return new ClientPrivilege(remote, this);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public Privilege[] getPrivilege(RemotePrivilege[] remote) {
-        final Privilege[] local = new Privilege[remote.length];
-        for (int i = 0; i < local.length; i++) {
-            local[i] = getPrivilege(remote[i]);
-        }
-        return local;
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java
deleted file mode 100644
index 901e34004..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItem.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Item;
-import javax.jcr.ItemVisitor;
-import javax.jcr.Node;
-import javax.jcr.Property;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.apache.jackrabbit.rmi.remote.RemoteItem;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteItem RemoteItem}
- * interface. This class makes a remote item locally available using
- * the JCR {@link javax.jcr.Item Item} interface. Used mainly as the
- * base class for the
- * {@link org.apache.jackrabbit.rmi.client.ClientProperty ClientProperty}
- * and
- * {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} adapters.
- *
- * @see javax.jcr.Item
- * @see org.apache.jackrabbit.rmi.remote.RemoteItem
- */
-@Deprecated(forRemoval = true) public class ClientItem extends ClientObject implements Item {
-
-    /** Current session. */
-    private Session session;
-
-    /** The adapted remote item. */
-    private RemoteItem remote;
-
-    /**
-     * Creates a local adapter for the given remote item.
-     *
-     * @param session current session
-     * @param remote  remote item
-     * @param factory local adapter factory
-     */
-    public ClientItem(Session session, RemoteItem remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /**
-     * Returns the current session without contacting the remote item.
-     *
-     * {@inheritDoc}
-     */
-    public Session getSession() {
-        return session;
-    }
-
-    /** {@inheritDoc} */
-    public String getPath() throws RepositoryException {
-        try {
-            return remote.getPath();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getName() throws RepositoryException {
-        try {
-            return remote.getName();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Item getAncestor(int level) throws RepositoryException {
-        try {
-            return getItem(getSession(), remote.getAncestor(level));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getParent() throws RepositoryException {
-        try {
-            return getNode(getSession(), remote.getParent());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public int getDepth() throws RepositoryException {
-        try {
-            return remote.getDepth();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * Returns false by default without contacting the remote item.
-     * This method should be overridden by {@link Node Node} subclasses.
-     *
-     * {@inheritDoc}
-     *
-     * @return false
-     */
-    public boolean isNode() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public boolean isNew() {
-        try {
-            return remote.isNew();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isModified() {
-        try {
-            return remote.isModified();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /**
-     * Checks whether this instance represents the same repository item as
-     * the given other instance. A simple heuristic is used to first check
-     * some generic conditions (null values, instance equality, type equality),
-     * after which the <em>item paths</em> are compared to determine sameness.
-     * A RuntimeException is thrown if the item paths cannot be retrieved.
-     *
-     * {@inheritDoc}
-     *
-     * @see Item#getPath()
-     */
-    public boolean isSame(Item item) throws RepositoryException {
-        if (item == null) {
-            return false;
-        } else if (equals(item)) {
-            return true;
-        } else if (isNode() == item.isNode()) {
-            return getPath().equals(item.getPath());
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * Accepts the visitor to visit this item. {@link Node Node} and
-     * {@link Property Property} subclasses should override this method
-     * to call the appropriate {@link ItemVisitor ItemVisitor} methods,
-     * as the default implementation does nothing.
-     *
-     * {@inheritDoc}
-     */
-    public void accept(ItemVisitor visitor) throws RepositoryException {
-    }
-
-    /** {@inheritDoc} */
-    public void save() throws RepositoryException {
-        try {
-            remote.save();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void refresh(boolean keepChanges) throws RepositoryException {
-        try {
-            remote.refresh(keepChanges);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void remove() throws RepositoryException {
-        try {
-            remote.remove();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java
deleted file mode 100644
index a602adc16..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.nodetype.ItemDefinition;
-import javax.jcr.nodetype.NodeType;
-
-import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteItemDefinition RemoteItemDefinition}
- * interface. This class makes a remote item definition locally available using
- * the JCR {@link javax.jcr.nodetype.ItemDefinition ItemDef} interface. Used mainly
- * as the base class for the
- * {@link org.apache.jackrabbit.rmi.client.ClientPropertyDefinition ClientPropertyDefinition}
- * and
- * {@link org.apache.jackrabbit.rmi.client.ClientNodeDefinition ClientNodeDefinition} adapters.
- *
- * @see javax.jcr.nodetype.ItemDefinition
- * @see org.apache.jackrabbit.rmi.remote.RemoteItemDefinition
- */
-@Deprecated(forRemoval = true) public class ClientItemDefinition extends ClientObject implements ItemDefinition {
-
-    /** The adapted remote item definition. */
-    private RemoteItemDefinition remote;
-
-    /**
-     * Creates a local adapter for the given remote item definition.
-     *
-     * @param remote remote item definition
-     * @param factory local adapter factory
-     */
-    public ClientItemDefinition(RemoteItemDefinition remote, LocalAdapterFactory factory) {
-        super(factory);
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public NodeType getDeclaringNodeType() {
-        try {
-            RemoteNodeType nt = remote.getDeclaringNodeType();
-            if (nt == null) {
-                return null;
-            } else {
-                return getFactory().getNodeType(nt);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getName() {
-        try {
-            return remote.getName();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isAutoCreated() {
-        try {
-            return remote.isAutoCreated();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isMandatory() {
-        try {
-            return remote.isMandatory();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public int getOnParentVersion() {
-        try {
-            return remote.getOnParentVersion();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isProtected() {
-        try {
-            return remote.isProtected();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java
deleted file mode 100644
index 39e32ad76..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLock.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.lock.Lock;
-
-import org.apache.jackrabbit.rmi.remote.RemoteLock;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteLock RemoteLock}
- * interface. This class makes a remote lock locally available using
- * the JCR {@link javax.jcr.lock.Lock Lock} interface.
- *
- * @see javax.jcr.lock.Lock
- * @see org.apache.jackrabbit.rmi.remote.RemoteLock
- */
-@Deprecated(forRemoval = true) public class ClientLock extends ClientObject implements Lock {
-
-    /** Current session. */
-    private Session session;
-
-    /** The adapted remote lock. */
-    private RemoteLock remote;
-
-    /**
-     * Creates a local adapter for the given remote lock.
-     *
-     * @param session current session
-     * @param remote remote lock
-     * @param factory local adapter factory
-     */
-    public ClientLock(Session session, RemoteLock remote, LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public Node getNode() {
-        try {
-            return getNode(session, remote.getNode());
-        } catch (RemoteException e) {
-            throw new RemoteRuntimeException(e);
-        } catch (RepositoryException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getLockOwner() {
-        try {
-            return remote.getLockOwner();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isDeep() {
-        try {
-            return remote.isDeep();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getLockToken() {
-        try {
-            return remote.getLockToken();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isLive() throws RepositoryException {
-        try {
-            return remote.isLive();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void refresh() throws RepositoryException {
-        try {
-            remote.refresh();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isSessionScoped() {
-        try {
-            return remote.isSessionScoped();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public long getSecondsRemaining() throws RepositoryException {
-        try {
-            return remote.getSecondsRemaining();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isLockOwningSession() {
-        try {
-            return remote.isLockOwningSession();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java
deleted file mode 100644
index 02ca2d94f..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientLockManager.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.lock.Lock;
-import javax.jcr.lock.LockManager;
-
-import org.apache.jackrabbit.rmi.remote.RemoteLockManager;
-
-@Deprecated(forRemoval = true) public class ClientLockManager extends ClientObject implements LockManager {
-
-    /** The current session. */
-    private Session session;
-
-    private RemoteLockManager remote;
-
-    public ClientLockManager(
-            Session session, RemoteLockManager remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    public String[] getLockTokens() throws RepositoryException {
-        try {
-            return remote.getLockTokens();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public void addLockToken(String lockToken) throws RepositoryException {
-        try {
-            remote.addLockToken(lockToken);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public void removeLockToken(String lockToken) throws RepositoryException {
-        try {
-            remote.removeLockToken(lockToken);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public Lock getLock(String absPath) throws RepositoryException {
-        try {
-            return getFactory().getLock(session, remote.getLock(absPath));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public boolean holdsLock(String absPath) throws RepositoryException {
-        try {
-            return remote.holdsLock(absPath);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public boolean isLocked(String absPath) throws RepositoryException {
-        try {
-            return remote.isLocked(absPath);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public Lock lock(
-            String absPath, boolean isDeep, boolean isSessionScoped,
-            long timeoutHint, String ownerInfo) throws RepositoryException {
-        try {
-            return getFactory().getLock(session, remote.lock(
-                    absPath, isDeep, isSessionScoped, timeoutHint, ownerInfo));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public void unlock(String absPath) throws RepositoryException {
-        try {
-            remote.unlock(absPath);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java
deleted file mode 100644
index 0a95cc576..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNamespaceRegistry.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.NamespaceRegistry;
-import javax.jcr.RepositoryException;
-
-import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry RemoteNamespaceRegistry}
- * interface. This class makes a remote namespace registry locally available
- * using the JCR {@link javax.jcr.NamespaceRegistry NamespaceRegistry}
- * interface.
- *
- * @see javax.jcr.NamespaceRegistry
- * @see org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry
- */
-@Deprecated(forRemoval = true) public class ClientNamespaceRegistry extends ClientObject implements
-        NamespaceRegistry {
-
-    /** The adapted remote namespace registry. */
-    private RemoteNamespaceRegistry remote;
-
-    /**
-     * Creates a local adapter for the given remote namespace registry.
-     *
-     * @param remote remote namespace registry
-     * @param factory local adapter factory
-     */
-    public ClientNamespaceRegistry(
-            RemoteNamespaceRegistry remote, LocalAdapterFactory factory) {
-        super(factory);
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public void registerNamespace(String prefix, String uri)
-            throws RepositoryException {
-        try {
-            remote.registerNamespace(prefix, uri);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void unregisterNamespace(String prefix) throws RepositoryException {
-        try {
-            remote.unregisterNamespace(prefix);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getPrefixes() throws RepositoryException {
-        try {
-            return remote.getPrefixes();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getURIs() throws RepositoryException {
-        try {
-            return remote.getURIs();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getURI(String prefix) throws RepositoryException {
-        try {
-            return remote.getURI(prefix);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getPrefix(String uri) throws RepositoryException {
-        try {
-            return remote.getPrefix(uri);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java
deleted file mode 100644
index eb970ebea..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNode.java
+++ /dev/null
@@ -1,800 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.rmi.RemoteException;
-import java.util.Calendar;
-
-import javax.jcr.Binary;
-import javax.jcr.Item;
-import javax.jcr.ItemVisitor;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-import javax.jcr.lock.Lock;
-import javax.jcr.nodetype.NodeDefinition;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionHistory;
-
-import org.apache.jackrabbit.rmi.remote.RemoteLock;
-import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.value.SerialValueFactory;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteNode RemoteNode}
- * interface. This class makes a remote node locally available using
- * the JCR {@link javax.jcr.Node Node} interface.
- *
- * @see javax.jcr.Node
- * @see org.apache.jackrabbit.rmi.remote.RemoteNode
- */
-@Deprecated(forRemoval = true) public class ClientNode extends ClientItem implements Node {
-
-    /** The adapted remote node. */
-    private RemoteNode remote;
-
-    /**
-     * Creates a local adapter for the given remote node.
-     *
-     * @param session current session
-     * @param remote  remote node
-     * @param factory local adapter factory
-     */
-    public ClientNode(
-            Session session, RemoteNode remote, LocalAdapterFactory factory) {
-        super(session, remote, factory);
-        this.remote = remote;
-    }
-
-    /**
-     * Returns <code>true</code> without contacting the remote node.
-     *
-     * {@inheritDoc}
-     */
-    public boolean isNode() {
-        return true;
-    }
-
-    /**
-     * Calls the {@link ItemVisitor#visit(Node) ItemVisitor.visit(Node)}
-     * method of the given visitor. Does not contact the remote node, but
-     * the visitor may invoke other methods that do contact the remote node.
-     *
-     * {@inheritDoc}
-     */
-    public void accept(ItemVisitor visitor) throws RepositoryException {
-        visitor.visit(this);
-    }
-
-    /** {@inheritDoc} */
-    public Node addNode(String path) throws RepositoryException {
-        try {
-            return getNode(getSession(), remote.addNode(path));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node addNode(String path, String type) throws RepositoryException {
-        try {
-            RemoteNode node = remote.addNode(path, type);
-            return getNode(getSession(), node);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void orderBefore(String src, String dst) throws RepositoryException {
-        try {
-            remote.orderBefore(src, dst);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, Value value)
-            throws RepositoryException {
-        try {
-            if (value == null) {
-                remote.setProperty(name, value);
-                return null;
-            } else {
-                RemoteProperty property = remote.setProperty(
-                        name, SerialValueFactory.makeSerialValue(value));
-                return getFactory().getProperty(getSession(), property);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, Value[] values)
-            throws RepositoryException {
-        try {
-            if (values == null) {
-                remote.setProperty(name, values);
-                return null;
-            } else {
-                Value[] serials = SerialValueFactory.makeSerialValueArray(values);
-                RemoteProperty property = remote.setProperty(name, serials);
-                return getFactory().getProperty(getSession(), property);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, String[] strings)
-            throws RepositoryException {
-        try {
-            if (strings == null) {
-                remote.setProperty(name, (Value[]) null);
-                return null;
-            } else {
-                Value[] serials = SerialValueFactory.makeSerialValueArray(strings);
-                RemoteProperty property = remote.setProperty(name, serials);
-                return getFactory().getProperty(getSession(), property);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, String value)
-            throws RepositoryException {
-        if (value == null) {
-            return setProperty(name, (Value) null);
-        } else {
-            return setProperty(name, getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, InputStream value)
-            throws RepositoryException {
-        if (value == null) {
-            return setProperty(name, (Value) null);
-        } else {
-            return setProperty(name, getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, boolean value)
-            throws RepositoryException {
-        return setProperty(name, getSession().getValueFactory().createValue(value));
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, double value)
-            throws RepositoryException {
-        return setProperty(name, getSession().getValueFactory().createValue(value));
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, long value)
-            throws RepositoryException {
-        return setProperty(name, getSession().getValueFactory().createValue(value));
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, Calendar value)
-            throws RepositoryException {
-        if (value == null) {
-            return setProperty(name, (Value) null);
-        } else {
-            return setProperty(name, getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, Node value)
-            throws RepositoryException {
-        if (value == null) {
-            return setProperty(name, (Value) null);
-        } else {
-            return setProperty(name, getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, Binary value)
-            throws RepositoryException {
-        if (value == null) {
-            return setProperty(name, (Value) null);
-        } else {
-            return setProperty(
-                    name, getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, BigDecimal value)
-            throws RepositoryException {
-        if (value == null) {
-            return setProperty(name, (Value) null);
-        } else {
-            return setProperty(
-                    name, getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getNode(String path) throws RepositoryException {
-        try {
-            return getNode(getSession(), remote.getNode(path));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator getNodes() throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(getSession(), remote.getNodes());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator getNodes(String pattern) throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(getSession(), remote.getNodes(pattern));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator getNodes(String[] globs) throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(getSession(), remote.getNodes(globs));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property getProperty(String path) throws RepositoryException {
-        try {
-            RemoteProperty property = remote.getProperty(path);
-            return getFactory().getProperty(getSession(), property);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyIterator getProperties() throws RepositoryException {
-        try {
-            return getFactory().getPropertyIterator(getSession(), remote.getProperties());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyIterator getProperties(String pattern)
-            throws RepositoryException {
-        try {
-            return getFactory().getPropertyIterator(getSession(), remote.getProperties(pattern));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyIterator getProperties(String[] globs)
-            throws RepositoryException {
-        try {
-            return getFactory().getPropertyIterator(getSession(), remote.getProperties(globs));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Item getPrimaryItem() throws RepositoryException {
-        try {
-            return getItem(getSession(), remote.getPrimaryItem());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getIdentifier() throws RepositoryException {
-        try {
-            return remote.getIdentifier();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getUUID() throws RepositoryException {
-        try {
-            return remote.getUUID();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyIterator getReferences() throws RepositoryException {
-        try {
-            return getFactory().getPropertyIterator(getSession(), remote.getReferences());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyIterator getReferences(String name)
-            throws RepositoryException {
-        try {
-            return getFactory().getPropertyIterator(getSession(), remote.getReferences(name));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasNode(String path) throws RepositoryException {
-        try {
-            return remote.hasNode(path);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasProperty(String path) throws RepositoryException {
-        try {
-            return remote.hasProperty(path);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasNodes() throws RepositoryException {
-        try {
-            return remote.hasNodes();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasProperties() throws RepositoryException {
-        try {
-            return remote.hasProperties();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeType getPrimaryNodeType() throws RepositoryException {
-        try {
-            return getFactory().getNodeType(remote.getPrimaryNodeType());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeType[] getMixinNodeTypes() throws RepositoryException {
-        try {
-            return getNodeTypeArray(remote.getMixinNodeTypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isNodeType(String type) throws RepositoryException {
-        try {
-            return remote.isNodeType(type);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void addMixin(String name) throws RepositoryException {
-        try {
-            remote.addMixin(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeMixin(String name) throws RepositoryException {
-        try {
-            remote.removeMixin(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canAddMixin(String name) throws RepositoryException {
-        try {
-            return remote.canAddMixin(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeDefinition getDefinition() throws RepositoryException {
-        try {
-            return getFactory().getNodeDef(remote.getDefinition());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version checkin() throws RepositoryException {
-        try {
-            return getFactory().getVersion(getSession(), remote.checkin());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void checkout() throws RepositoryException {
-        try {
-            remote.checkout();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void update(String workspace) throws RepositoryException {
-        try {
-            remote.update(workspace);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator merge(String workspace, boolean bestEffort)
-            throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(getSession(), remote.merge(workspace, bestEffort));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void cancelMerge(Version version) throws RepositoryException {
-        try {
-            remote.cancelMerge(version.getUUID());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void doneMerge(Version version) throws RepositoryException {
-        try {
-            remote.doneMerge(version.getUUID());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getCorrespondingNodePath(String workspace)
-            throws RepositoryException {
-        try {
-            return remote.getCorrespondingNodePath(workspace);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public int getIndex() throws RepositoryException {
-        try {
-            return remote.getIndex();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(String version, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restore(version, removeExisting);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(Version version, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restoreByUUID(version.getUUID(), removeExisting);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(Version version, String path, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restore(version.getUUID(), path, removeExisting);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restoreByLabel(String label, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restoreByLabel(label, removeExisting);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, String[] strings, int type)
-            throws RepositoryException {
-        try {
-            if (strings == null) {
-                remote.setProperty(name, (Value[]) null);
-                return null;
-            } else {
-                Value[] serials = SerialValueFactory.makeSerialValueArray(strings);
-                RemoteProperty property = remote.setProperty(name, serials, type);
-                return getFactory().getProperty(getSession(), property);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, Value[] values, int type)
-            throws RepositoryException {
-        try {
-            if (values != null) {
-                values = SerialValueFactory.makeSerialValueArray(values);
-            }
-            RemoteProperty property = remote.setProperty(name, values, type);
-            if (property != null) {
-                return getFactory().getProperty(getSession(), property);
-            } else {
-                return null;
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, Value value, int type)
-            throws RepositoryException {
-        try {
-            if (value != null) {
-                value = SerialValueFactory.makeSerialValue(value);
-            }
-            RemoteProperty property = remote.setProperty(name, value, type);
-            if (property != null) {
-                return getFactory().getProperty(getSession(), property);
-            } else {
-                return null;
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property setProperty(String name, String string, int type)
-            throws RepositoryException {
-        Value value = null;
-        if (string != null) {
-            value = getSession().getValueFactory().createValue(string);
-        }
-        return setProperty(name, value, type);
-    }
-
-    /** {@inheritDoc} */
-    public boolean isCheckedOut() throws RepositoryException {
-        try {
-            return remote.isCheckedOut();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public VersionHistory getVersionHistory() throws RepositoryException {
-        try {
-            return getFactory().getVersionHistory(getSession(), remote.getVersionHistory());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version getBaseVersion() throws RepositoryException {
-        try {
-            return getFactory().getVersion(getSession(), remote.getBaseVersion());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Lock lock(boolean isDeep, boolean isSessionScoped)
-            throws RepositoryException {
-        try {
-            RemoteLock lock = remote.lock(isDeep, isSessionScoped);
-            return getFactory().getLock(getSession(), lock);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Lock getLock() throws RepositoryException {
-        try {
-            return getFactory().getLock(getSession(), remote.getLock());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void unlock() throws RepositoryException {
-        try {
-            remote.unlock();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean holdsLock() throws RepositoryException {
-        try {
-            return remote.holdsLock();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-     }
-
-    /** {@inheritDoc} */
-    public boolean isLocked() throws RepositoryException {
-        try {
-            return remote.isLocked();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void followLifecycleTransition(String transition)
-            throws RepositoryException {
-        try {
-        	remote.followLifecycleTransition(transition);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getAllowedLifecycleTransistions()
-            throws RepositoryException {
-        try {
-        	return remote.getAllowedLifecycleTransistions();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator getSharedSet() throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(getSession(), remote.getSharedSet());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyIterator getWeakReferences() throws RepositoryException {
-        try {
-            return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyIterator getWeakReferences(String name)
-            throws RepositoryException {
-        try {
-            return getFactory().getPropertyIterator(getSession(), remote.getWeakReferences(name));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeShare() throws RepositoryException {
-        try {
-            remote.removeShare();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeSharedSet() throws RepositoryException {
-        try {
-            remote.removeSharedSet();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void setPrimaryType(String nodeTypeName)
-            throws RepositoryException {
-        try {
-            remote.setPrimaryType(nodeTypeName);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java
deleted file mode 100644
index 05cbc5685..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.nodetype.NodeDefinition;
-import javax.jcr.nodetype.NodeType;
-
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition RemoteNodeDefinition}
- * interface. This class makes a remote node definition locally available using
- * the JCR {@link javax.jcr.nodetype.NodeDefinition NodeDef} interface.
- *
- * @see javax.jcr.nodetype.NodeDefinition
- * @see org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition
- */
-@Deprecated(forRemoval = true) public class ClientNodeDefinition extends ClientItemDefinition implements NodeDefinition {
-
-    /** The adapted remote node definition. */
-    private RemoteNodeDefinition remote;
-
-    /**
-     * Creates a local adapter for the given remote node definition.
-     *
-     * @param remote remote node definition
-     * @param factory local adapter factory
-     */
-    public ClientNodeDefinition(RemoteNodeDefinition remote, LocalAdapterFactory factory) {
-        super(remote, factory);
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public NodeType[] getRequiredPrimaryTypes() {
-        try {
-            return getNodeTypeArray(remote.getRequiredPrimaryTypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeType getDefaultPrimaryType() {
-        try {
-            RemoteNodeType nt = remote.getDefaultPrimaryType();
-            if (nt == null) {
-                return null;
-            } else {
-                return getFactory().getNodeType(nt);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean allowsSameNameSiblings() {
-        try {
-            return remote.allowsSameNameSiblings();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getDefaultPrimaryTypeName() {
-        try {
-            return remote.getDefaultPrimaryTypeName();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getRequiredPrimaryTypeNames() {
-        try {
-            return remote.getRequiredPrimaryTypeNames();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java
deleted file mode 100644
index 37bf47364..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeType.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.nodetype.NodeDefinition;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.nodetype.NodeTypeIterator;
-import javax.jcr.nodetype.PropertyDefinition;
-
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
-import org.apache.jackrabbit.rmi.value.SerialValueFactory;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeType RemoteNodeType}
- * interface. This class makes a remote node type locally available using
- * the JCR {@link javax.jcr.nodetype.NodeType NodeType} interface.
- *
- * @see javax.jcr.nodetype.NodeType
- * @see org.apache.jackrabbit.rmi.remote.RemoteNodeType
- */
-@Deprecated(forRemoval = true) public class ClientNodeType extends ClientObject implements NodeType {
-
-    /** The adapted remote node type. */
-    private RemoteNodeType remote;
-
-    /**
-     * Creates a local adapter for the given remote node type.
-     *
-     * @param remote remote node type
-     * @param factory local adapter factory
-     */
-    public ClientNodeType(RemoteNodeType remote, LocalAdapterFactory factory) {
-        super(factory);
-        this.remote = remote;
-    }
-
-    /**
-     * Utility method for creating an array of local node definition
-     * adapters for an array of remote node definitions. The node
-     * definition adapters are created using the local adapter factory.
-     * <p>
-     * A <code>null</code> input is treated as an empty array.
-     *
-     * @param remotes remote node definitions
-     * @return local node definition array
-     */
-    private NodeDefinition[] getNodeDefArray(RemoteNodeDefinition[] remotes) {
-        if (remotes != null) {
-            NodeDefinition[] defs = new NodeDefinition[remotes.length];
-            for (int i = 0; i < remotes.length; i++) {
-                defs[i] = getFactory().getNodeDef(remotes[i]);
-            }
-            return defs;
-        } else {
-            return new NodeDefinition[0]; // for safety
-        }
-    }
-
-    /**
-     * Utility method for creating an array of local property definition
-     * adapters for an array of remote property definitions. The property
-     * definition adapters are created using the local adapter factory.
-     * <p>
-     * A <code>null</code> input is treated as an empty array.
-     *
-     * @param remotes remote property definitions
-     * @return local property definition array
-     */
-    protected PropertyDefinition[] getPropertyDefArray(
-            RemotePropertyDefinition[] remotes) {
-        if (remotes != null) {
-            PropertyDefinition[] defs = new PropertyDefinition[remotes.length];
-            for (int i = 0; i < remotes.length; i++) {
-                defs[i] = getFactory().getPropertyDef(remotes[i]);
-            }
-            return defs;
-        } else {
-            return new PropertyDefinition[0]; // for safety
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getName() {
-        try {
-            return remote.getName();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isMixin() {
-        try {
-            return remote.isMixin();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasOrderableChildNodes() {
-        try {
-            return remote.hasOrderableChildNodes();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeType[] getSupertypes() {
-        try {
-            return getNodeTypeArray(remote.getSupertypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeType[] getDeclaredSupertypes() {
-        try {
-            return getNodeTypeArray(remote.getDeclaredSupertypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isNodeType(String type) {
-        try {
-            return remote.isNodeType(type);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyDefinition[] getPropertyDefinitions() {
-        try {
-            return getPropertyDefArray(remote.getPropertyDefs());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyDefinition[] getDeclaredPropertyDefinitions() {
-        try {
-            return getPropertyDefArray(remote.getDeclaredPropertyDefs());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeDefinition[] getChildNodeDefinitions() {
-        try {
-            return getNodeDefArray(remote.getChildNodeDefs());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeDefinition[] getDeclaredChildNodeDefinitions() {
-        try {
-            return getNodeDefArray(remote.getDeclaredChildNodeDefs());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canSetProperty(String name, Value value) {
-        try {
-            return remote.canSetProperty(
-                    name, SerialValueFactory.makeSerialValue(value));
-        } catch (RepositoryException e) {
-            throw new RuntimeException("Unable to serialize value", e);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canSetProperty(String name, Value[] values) {
-        try {
-            Value[] serials = SerialValueFactory.makeSerialValueArray(values);
-            return remote.canSetProperty(name, serials);
-        } catch (RepositoryException e) {
-            throw new RuntimeException("Unable to serialize values", e);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canAddChildNode(String name) {
-        try {
-            return remote.canAddChildNode(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canAddChildNode(String name, String type) {
-        try {
-            return remote.canAddChildNode(name, type);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canRemoveItem(String name) {
-        try {
-            return remote.canRemoveItem(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getPrimaryItemName() {
-        try {
-            return remote.getPrimaryItemName();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canRemoveNode(String nodeName) {
-        try {
-            return remote.canRemoveNode(nodeName);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean canRemoveProperty(String propertyName) {
-        try {
-            return remote.canRemoveProperty(propertyName);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeTypeIterator getDeclaredSubtypes() {
-        try {
-            return getFactory().getNodeTypeIterator(remote.getDeclaredSubtypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeTypeIterator getSubtypes() {
-        try {
-            return getFactory().getNodeTypeIterator(remote.getSubtypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getDeclaredSupertypeNames() {
-        try {
-            return remote.getDeclaredSupertypeNames();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isAbstract() {
-        try {
-            return remote.isAbstract();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isQueryable() {
-        try {
-            return remote.isQueryable();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java
deleted file mode 100644
index 2a4555521..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientNodeTypeManager.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.nodetype.NodeDefinitionTemplate;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.nodetype.NodeTypeDefinition;
-import javax.jcr.nodetype.NodeTypeIterator;
-import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.nodetype.NodeTypeTemplate;
-import javax.jcr.nodetype.PropertyDefinitionTemplate;
-
-import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager RemoteNodeTypeManager}
- * interface. This class makes a remote node type manager locally available
- * using the JCR {@link javax.jcr.nodetype.NodeTypeManager NodeTypeManager}
- * interface.
- *
- * @see javax.jcr.nodetype.NodeTypeManager
- * @see org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager
- */
-@Deprecated(forRemoval = true) public class ClientNodeTypeManager extends ClientObject
-        implements NodeTypeManager {
-
-    /** The adapted remote node type manager. */
-    private RemoteNodeTypeManager remote;
-
-    /**
-     * Creates a local adapter for the given remote node type manager.
-     *
-     * @param remote remote node type manager
-     * @param factory local adapter factory
-     */
-    public ClientNodeTypeManager(
-            RemoteNodeTypeManager remote, LocalAdapterFactory factory) {
-        super(factory);
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public NodeType getNodeType(String name) throws RepositoryException {
-        try {
-            return getFactory().getNodeType(remote.getNodeType(name));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeTypeIterator getAllNodeTypes() throws RepositoryException {
-        try {
-            return getFactory().getNodeTypeIterator(remote.getAllNodeTypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeTypeIterator getPrimaryNodeTypes() throws RepositoryException {
-        try {
-            return getFactory().getNodeTypeIterator(remote.getPrimaryNodeTypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeTypeIterator getMixinNodeTypes() throws RepositoryException {
-        try {
-            return getFactory().getNodeTypeIterator(remote.getMixinNodeTypes());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public NodeDefinitionTemplate createNodeDefinitionTemplate()
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public NodeTypeTemplate createNodeTypeTemplate()
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public NodeTypeTemplate createNodeTypeTemplate(NodeTypeDefinition ntd)
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public PropertyDefinitionTemplate createPropertyDefinitionTemplate()
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public boolean hasNodeType(String name) throws RepositoryException {
-        try {
-            return remote.hasNodeType(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public NodeType registerNodeType(
-            NodeTypeDefinition ntd, boolean allowUpdate)
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public NodeTypeIterator registerNodeTypes(
-            NodeTypeDefinition[] ntds, boolean allowUpdate)
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public void unregisterNodeType(String name) throws RepositoryException {
-        unregisterNodeTypes(new String[] { name });
-    }
-
-    public void unregisterNodeTypes(String[] names) throws RepositoryException {
-        try {
-            remote.unregisterNodeTypes(names);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java
deleted file mode 100644
index 524161992..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObject.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import javax.jcr.Item;
-import javax.jcr.Node;
-import javax.jcr.Session;
-import javax.jcr.nodetype.NodeType;
-
-import org.apache.jackrabbit.rmi.remote.RemoteItem;
-import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.remote.RemoteVersion;
-import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Base class for client adapter objects. The only purpose of
- * this class is to centralize the handling of the
- * local adapter factory used by the client adapters to
- * instantiate new adapters.
- */
-@Deprecated(forRemoval = true) public class ClientObject {
-
-    /** Local adapter factory. */
-    private LocalAdapterFactory factory;
-
-    /**
-     * Creates a basic client adapter that uses the given factory
-     * to create new adapters.
-     *
-     * @param factory local adapter factory
-     */
-    protected ClientObject(LocalAdapterFactory factory) {
-        this.factory = factory;
-    }
-
-    /**
-     * Returns the local adapter factory used to create new adapters.
-     *
-     * @return local adapter factory
-     */
-    protected LocalAdapterFactory getFactory() {
-        return factory;
-    }
-
-    /**
-     * Utility method to create a local adapter for a remote item.
-     * This method introspects the remote reference to determine
-     * whether to instantiate a {@link javax.jcr.Property},
-     * a {@link Node Node}, or an {@link Item Item} adapter using
-     * the local adapter factory.
-     * <p>
-     * If the remote item is a {@link RemoteNode}, this method delegates
-     * to {@link #getNode(Session, RemoteNode)}.
-     *
-     * @param session current session
-     * @param remote remote item
-     * @return local property, node, or item adapter
-     */
-    protected Item getItem(Session session, RemoteItem remote) {
-        if (remote instanceof RemoteProperty) {
-            return factory.getProperty(session, (RemoteProperty) remote);
-        } else if (remote instanceof RemoteNode) {
-            return getNode(session, (RemoteNode) remote);
-        } else {
-            return factory.getItem(session, remote);
-        }
-    }
-
-    /**
-     * Utility method to create a local adapter for a remote node.
-     * This method introspects the remote reference to determine
-     * whether to instantiate a {@link Node Node},
-     * a {@link javax.jcr.version.VersionHistory VersionHistory}, or a
-     *  {@link javax.jcr.version.Version Version} adapter using
-     * the local adapter factory.
-     *
-     * @param session current session
-     * @param remote remote node
-     * @return local node, version, or version history adapter
-     */
-    protected Node getNode(Session session, RemoteNode remote) {
-        if (remote instanceof RemoteVersion) {
-            return factory.getVersion(session, (RemoteVersion) remote);
-        } else if (remote instanceof RemoteVersionHistory) {
-            return factory.getVersionHistory(session, (RemoteVersionHistory) remote);
-        } else {
-            return factory.getNode(session, remote);
-        }
-    }
-
-    /**
-     * Utility method for creating an array of local node type adapters
-     * for an array of remote node types. The node type adapters are created
-     * using the local adapter factory.
-     * <p>
-     * A <code>null</code> input is treated as an empty array.
-     *
-     * @param remotes remote node types
-     * @return local node type array
-     */
-    protected NodeType[] getNodeTypeArray(RemoteNodeType[] remotes) {
-        if (remotes != null) {
-            NodeType[] types = new NodeType[remotes.length];
-            for (int i = 0; i < remotes.length; i++) {
-                types[i] = factory.getNodeType(remotes[i]);
-            }
-            return types;
-        } else {
-            return new NodeType[0]; // for safety
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
deleted file mode 100644
index e30761eaf..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.Workspace;
-import javax.jcr.observation.EventJournal;
-import javax.jcr.observation.EventListener;
-import javax.jcr.observation.EventListenerIterator;
-import javax.jcr.observation.ObservationManager;
-
-import org.apache.jackrabbit.rmi.iterator.ArrayEventListenerIterator;
-import org.apache.jackrabbit.rmi.observation.ClientEventPoll;
-import org.apache.jackrabbit.rmi.remote.RemoteObservationManager;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * The <code>ClientObservationManager</code> class
- * <p>
- * This class uses an instance of the
- * {@link org.apache.jackrabbit.rmi.observation.ClientEventPoll} class for the
- * actual registration and event dispatching.
- * <p>
- * This class does not require the
- * {@link org.apache.jackrabbit.rmi.client.LocalAdapterFactory} and consequently
- * calls the base class constructor with a <code>null</code> factory.
- * <p>
- * See the {@link org.apache.jackrabbit.rmi.observation observation}
- * package comment for a description on how event listener registration and
- * notification is implemented.
- *
- * @see org.apache.jackrabbit.rmi.observation.ClientEventPoll
- */
-@Deprecated(forRemoval = true) public class ClientObservationManager extends ClientObject implements
-        ObservationManager {
-
-    /** The remote observation manager */
-    private final RemoteObservationManager remote;
-
-    /** The <code>Workspace</code> to which this observation manager belongs. */
-    private final Workspace workspace;
-
-    /** The ClientEventPoll class internally used for event dispatching */
-    private ClientEventPoll poller;
-
-    /**
-     * Creates an instance of this class talking to the given remote observation
-     * manager.
-     *
-     * @param remote The {@link RemoteObservationManager} backing this
-     *      client-side observation manager.
-     * @param workspace The <code>Workspace</code> instance to which this
-     *      observation manager belongs.
-     */
-    public ClientObservationManager(Workspace workspace,
-            RemoteObservationManager remote) {
-        super(null);
-        this.remote = remote;
-        this.workspace = workspace;
-    }
-
-    /** {@inheritDoc} */
-    public void addEventListener(EventListener listener, int eventTypes,
-            String absPath, boolean isDeep, String[] uuid,
-            String[] nodeTypeName, boolean noLocal)
-            throws RepositoryException {
-        try {
-            long listenerId = getClientEventPoll().addListener(listener);
-            remote.addEventListener(listenerId, eventTypes, absPath,
-                isDeep, uuid, nodeTypeName, noLocal);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeEventListener(EventListener listener)
-            throws RepositoryException {
-        try {
-            long id = getClientEventPoll().removeListener(listener);
-            remote.removeEventListener(id);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public EventListenerIterator getRegisteredEventListeners() {
-        EventListener[] listeners = (poller != null)
-                ? poller.getListeners()
-                : new EventListener[0];
-        return new ArrayEventListenerIterator(listeners);
-    }
-
-    public EventJournal getEventJournal() throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public EventJournal getEventJournal(
-            int eventTypes, String absPath, boolean isDeep,
-            String[] uuid, String[] nodeTypeName) throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public void setUserData(String userData) throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    //---------- internal ------------------------------------------------------
-
-    /**
-     * Returns the {@link ClientEventPoll} instance used by this (client-side)
-     * observation manager. This method creates the instance on the first call
-     * and starts the poller thread to wait for remote events.
-     *
-     * @return poller instance
-     */
-    private synchronized ClientEventPoll getClientEventPoll() {
-        if (poller == null) {
-            poller = new ClientEventPoll(remote, workspace.getSession());
-            poller.start();
-        }
-        return poller;
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java
deleted file mode 100644
index 16f0359f6..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientProperty.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.rmi.RemoteException;
-import java.util.Calendar;
-
-import javax.jcr.Binary;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.ItemVisitor;
-import javax.jcr.Node;
-import javax.jcr.PathNotFoundException;
-import javax.jcr.Property;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-import javax.jcr.ValueFactory;
-import javax.jcr.ValueFormatException;
-import javax.jcr.nodetype.PropertyDefinition;
-
-import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.value.SerialValueFactory;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteProperty RemoteProperty}
- * interface. This class makes a remote property locally available using
- * the JCR {@link javax.jcr.Property Property} interface.
- *
- * @see javax.jcr.Property
- * @see org.apache.jackrabbit.rmi.remote.RemoteProperty
- */
-@Deprecated(forRemoval = true) public class ClientProperty extends ClientItem implements Property {
-
-    /** The adapted remote property. */
-    private RemoteProperty remote;
-
-    /**
-     * Creates a local adapter for the given remote property.
-     *
-     * @param session current session
-     * @param remote  remote property
-     * @param factory local adapter factory
-     */
-    public ClientProperty(
-            Session session, RemoteProperty remote,
-            LocalAdapterFactory factory) {
-        super(session, remote, factory);
-        this.remote = remote;
-    }
-
-    /**
-     * Calls the {@link ItemVisitor#visit(Property) ItemVisitor.visit(Property}
-     * method of the given visitor. Does not contact the remote property, but
-     * the visitor may invoke other methods that do contact the remote property.
-     *
-     * {@inheritDoc}
-     */
-    public void accept(ItemVisitor visitor) throws RepositoryException {
-        visitor.visit(this);
-    }
-
-    /**
-     * Returns the boolean value of this property. Implemented as
-     * getValue().getBoolean().
-     *
-     * {@inheritDoc}
-     */
-    public boolean getBoolean() throws RepositoryException {
-        return getValue().getBoolean();
-    }
-
-    /**
-     * Returns the date value of this property. Implemented as
-     * getValue().getDate().
-     *
-     * {@inheritDoc}
-     */
-    public Calendar getDate() throws RepositoryException {
-        return getValue().getDate();
-    }
-
-    /**
-     * Returns the double value of this property. Implemented as
-     * getValue().getDouble().
-     *
-     * {@inheritDoc}
-     */
-    public double getDouble() throws RepositoryException {
-        return getValue().getDouble();
-    }
-
-    /**
-     * Returns the long value of this property. Implemented as
-     * getValue().getLong().
-     *
-     * {@inheritDoc}
-     */
-    public long getLong() throws RepositoryException {
-        return getValue().getLong();
-    }
-
-    /**
-     * Returns the binary value of this property. Implemented as
-     * getValue().getBinary().
-     *
-     * {@inheritDoc}
-     */
-    public Binary getBinary() throws RepositoryException {
-        return getValue().getBinary();
-    }
-
-    /**
-     * Returns the decimal value of this property. Implemented as
-     * getValue().getDecimal().
-     *
-     * {@inheritDoc}
-     */
-    public BigDecimal getDecimal() throws RepositoryException {
-        return getValue().getDecimal();
-    }
-
-    /**
-     * Returns the binary value of this property. Implemented as
-     * getValue().getStream().
-     *
-     * {@inheritDoc}
-     */
-    @SuppressWarnings("deprecation")
-    public InputStream getStream() throws RepositoryException {
-        return getValue().getStream();
-    }
-
-    /**
-     * Returns the string value of this property. Implemented as
-     * getValue().getString().
-     *
-     * {@inheritDoc}
-     */
-    public String getString() throws RepositoryException {
-        return getValue().getString();
-    }
-
-    /** {@inheritDoc} */
-    public Value getValue() throws RepositoryException {
-        try {
-            return remote.getValue();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Value[] getValues() throws RepositoryException {
-        try {
-            return remote.getValues();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * Sets the boolean value of this property. Implemented as
-     * setValue(new BooleanValue(value)).
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(boolean value) throws RepositoryException {
-        setValue(getSession().getValueFactory().createValue(value));
-    }
-
-    /**
-     * Sets the date value of this property. Implemented as
-     * setValue(new DateValue(value)).
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(Calendar value) throws RepositoryException {
-        if (value == null) {
-            setValue((Value) null);
-        } else {
-            setValue(getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /**
-     * Sets the double value of this property. Implemented as
-     * setValue(new DoubleValue(value)).
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(double value) throws RepositoryException {
-        setValue(getSession().getValueFactory().createValue(value));
-    }
-
-    /**
-     * Sets the binary value of this property. Implemented as
-     * setValue(new BinaryValue(value)).
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(InputStream value) throws RepositoryException {
-        if (value == null) {
-            setValue((Value) null);
-        } else {
-            ValueFactory factory = getSession().getValueFactory();
-            Binary binary = factory.createBinary(value);
-            try {
-                setValue(factory.createValue(binary));
-            } finally {
-                binary.dispose();
-            }
-        }
-    }
-
-    /**
-     * Sets the long value of this property. Implemented as
-     * setValue(new LongValue(value)).
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(long value) throws RepositoryException {
-        setValue(getSession().getValueFactory().createValue(value));
-    }
-
-    /**
-     * Sets the binary value of this property.
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(Binary value) throws RepositoryException {
-        setValue(getSession().getValueFactory().createValue(value));
-    }
-
-    /**
-     * Sets the decimal value of this property.
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(BigDecimal value) throws RepositoryException {
-        setValue(getSession().getValueFactory().createValue(value));
-    }
-
-
-    /**
-     * Sets the reference value of this property. Implemented as
-     * setValue(new ReferenceValue(value)).
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(Node value) throws RepositoryException {
-        if (value == null) {
-            setValue((Value) null);
-        } else {
-            setValue(getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /**
-     * Sets the string value of this property. Implemented as
-     * setValue(new StringValue(value)).
-     *
-     * {@inheritDoc}
-     */
-    public void setValue(String value) throws RepositoryException {
-        if (value == null) {
-            setValue((Value) null);
-        } else {
-            setValue(getSession().getValueFactory().createValue(value));
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setValue(String[] strings) throws RepositoryException {
-        try {
-            Value[] values = null;
-            if (strings != null) {
-                values = SerialValueFactory.makeSerialValueArray(strings);
-            }
-            remote.setValue(values);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void setValue(Value value) throws RepositoryException {
-        try {
-            if (value != null) {
-                value = SerialValueFactory.makeSerialValue(value);
-            }
-            remote.setValue(value);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void setValue(Value[] values) throws RepositoryException {
-        try {
-            if (values != null) {
-                values = SerialValueFactory.makeSerialValueArray(values);
-            }
-            remote.setValue(values);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * Returns the reference value of this property. Implemented by
-     * converting the reference value to an UUID string and using the
-     * current session to look up the referenced node.
-     *
-     * {@inheritDoc}
-     */
-    public Node getNode() throws RepositoryException {
-        String value = getString();
-
-        switch (getType()) {
-            case PropertyType.REFERENCE:
-            case PropertyType.WEAKREFERENCE:
-                return getSession().getNodeByIdentifier(value);
-
-            case PropertyType.PATH:
-                try {
-                    if (value.startsWith("/")) {
-                        return getSession().getNode(value);
-                    } else {
-                        return getParent().getNode(value);
-                    }
-                } catch (PathNotFoundException e) {
-                    throw new ItemNotFoundException(value);
-                }
-
-            case PropertyType.NAME:
-                try {
-                    return getParent().getNode(value);
-                } catch (PathNotFoundException e) {
-                    throw new ItemNotFoundException(value);
-                }
-
-            case PropertyType.STRING:
-                try {
-                    // interpret as identifier
-                    Value refValue = getSession().getValueFactory().createValue(value, PropertyType.REFERENCE);
-                    return getSession().getNodeByIdentifier(refValue.getString());
-                } catch (ItemNotFoundException e) {
-                    throw e;
-                } catch (RepositoryException e) {
-                    // try if STRING value can be interpreted as PATH value
-                    Value pathValue = getSession().getValueFactory().createValue(value, PropertyType.PATH);
-                    boolean absolute = value.startsWith("/");
-                    try {
-                        return (absolute) ? getSession().getNode(pathValue.getString()) : getParent().getNode(pathValue.getString());
-                    } catch (PathNotFoundException e1) {
-                        throw new ItemNotFoundException(pathValue.getString());
-                    }
-                }
-
-            default:
-                throw new ValueFormatException("Property value cannot be converted to a PATH, REFERENCE or WEAKREFERENCE: " + value);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property getProperty() throws RepositoryException {
-        if (getType() != PropertyType.PATH && getType() != PropertyType.NAME) {
-            throw new ValueFormatException("Not a path property");
-        } else {
-            String value = getString();
-            try {
-                if (value.startsWith("/")) {
-                    return getSession().getProperty(value);
-                } else {
-                    return getParent().getProperty(value);
-                }
-            } catch (PathNotFoundException e) {
-                throw new ItemNotFoundException(value);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public long getLength() throws RepositoryException {
-        try {
-            return remote.getLength();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public long[] getLengths() throws RepositoryException {
-        try {
-            return remote.getLengths();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public PropertyDefinition getDefinition() throws RepositoryException {
-        try {
-            return getFactory().getPropertyDef(remote.getDefinition());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public int getType() throws RepositoryException {
-        try {
-            return remote.getType();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isMultiple() throws RepositoryException {
-        // TODO: Direct remote call for this?
-        return getDefinition().isMultiple();
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java
deleted file mode 100644
index 161ba536f..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientPropertyDefinition.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Value;
-import javax.jcr.nodetype.PropertyDefinition;
-
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition RemotePropertyDefinition}
- * interface. This class makes a remote property definition locally available
- * using the JCR {@link javax.jcr.nodetype.PropertyDefinition PropertyDef} interface.
- *
- * @see javax.jcr.nodetype.PropertyDefinition
- * @see org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition
- */
-@Deprecated(forRemoval = true) public class ClientPropertyDefinition extends ClientItemDefinition implements PropertyDefinition {
-
-    /** The adapted remote property. */
-    private RemotePropertyDefinition remote;
-
-    /**
-     * Creates a local adapter for the given remote property definition.
-     *
-     * @param remote remote property definition
-     * @param factory local adapter factory
-     */
-    public ClientPropertyDefinition(
-            RemotePropertyDefinition remote, LocalAdapterFactory factory) {
-        super(remote, factory);
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public int getRequiredType() {
-        try {
-            return remote.getRequiredType();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getValueConstraints() {
-        try {
-            return remote.getValueConstraints();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Value[] getDefaultValues() {
-        try {
-            return remote.getDefaultValues();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isMultiple() {
-        try {
-            return remote.isMultiple();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getAvailableQueryOperators() {
-        try {
-            return remote.getAvailableQueryOperators();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isFullTextSearchable() {
-        try {
-            return remote.isFullTextSearchable();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isQueryOrderable() {
-        try {
-            return remote.isQueryOrderable();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java
deleted file mode 100644
index aee001a45..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQuery.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Node;
-import javax.jcr.Value;
-import javax.jcr.query.Query;
-import javax.jcr.query.QueryResult;
-
-import org.apache.jackrabbit.rmi.remote.RemoteQuery;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link RemoteQuery RemoteQuery}
- * interface. This class makes a remote query locally available using
- * the JCR {@link Query Query} interface.
- *
- * @see javax.jcr.query.Query Query
- * @see org.apache.jackrabbit.rmi.remote.RemoteQuery
- */
-@Deprecated(forRemoval = true) public class ClientQuery extends ClientObject implements Query {
-
-    /** The current session */
-    private Session session;
-
-    /** The adapted remote query manager. */
-    private RemoteQuery remote;
-
-    /**
-     * Creates a client adapter for the given query.
-     *
-     * @param session current session
-     * @param remote remote query
-     * @param factory adapter factory
-     */
-    public ClientQuery(
-            Session session, RemoteQuery remote, LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public QueryResult execute() throws RepositoryException {
-        try {
-            return getFactory().getQueryResult(session, remote.execute());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getStatement() {
-        try {
-            return remote.getStatement();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getLanguage() {
-        try {
-            return remote.getLanguage();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getStoredQueryPath() throws RepositoryException {
-        try {
-            return remote.getStoredQueryPath();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node storeAsNode(String absPath) throws RepositoryException {
-        try {
-            return getNode(session, remote.storeAsNode(absPath));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void bindValue(String varName, Value value)
-            throws RepositoryException {
-        try {
-            remote.bindValue(varName, value);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getBindVariableNames() throws RepositoryException {
-        try {
-            return remote.getBindVariableNames();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void setLimit(long limit) {
-        try {
-            remote.setLimit(limit);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void setOffset(long offset) {
-        try {
-            remote.setOffset(offset);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java
deleted file mode 100644
index 3590c2be6..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryManager.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.query.Query;
-import javax.jcr.query.QueryManager;
-import javax.jcr.query.qom.QueryObjectModelFactory;
-
-import org.apache.jackrabbit.rmi.remote.RemoteQuery;
-import org.apache.jackrabbit.rmi.remote.RemoteQueryManager;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteQueryManager RemoteQueryManager}
- * interface. This class makes a remote query manager locally available using
- * the JCR {@link QueryManager QueryManager} interface.
- *
- * @see javax.jcr.query.QueryManager QueryManager
- * @see org.apache.jackrabbit.rmi.remote.RemoteQueryManager
- */
-@Deprecated(forRemoval = true) public class ClientQueryManager extends ClientObject implements QueryManager {
-
-    /** The current session */
-    private Session session;
-
-    /** The adapted remote query manager. */
-    private RemoteQueryManager remote;
-
-    /**
-     * Creates a client adapter for the given remote query manager.
-     *
-     * @param session current session
-     * @param remote remote query manager
-     * @param factory adapter factory
-     */
-    public ClientQueryManager(
-            Session session, RemoteQueryManager remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public Query createQuery(String statement, String language)
-            throws  RepositoryException {
-        try {
-            RemoteQuery query = remote.createQuery(statement, language);
-            return getFactory().getQuery(session, query);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Query getQuery(Node node) throws RepositoryException {
-        try {
-            // TODO fix this remote node dereferencing hack
-            RemoteQuery query = remote.getQuery(node.getPath());
-            return getFactory().getQuery(session, query);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getSupportedQueryLanguages() throws RepositoryException {
-        try {
-            return remote.getSupportedQueryLanguages();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    public QueryObjectModelFactory getQOMFactory() {
-        throw new RuntimeException("TODO: JCR-3206");
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java
deleted file mode 100644
index a03b45862..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientQueryResult.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.query.QueryResult;
-import javax.jcr.query.RowIterator;
-
-import org.apache.jackrabbit.rmi.remote.RemoteQueryResult;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link RemoteQueryResult RemoteQueryResult}
- * interface. This class makes a remote query result locally available using
- * the JCR {@link QueryResult QueryResult} interface.
- *
- * @see javax.jcr.query.QueryResult QueryResult
- * @see org.apache.jackrabbit.rmi.remote.RemoteQueryResult
- */
-@Deprecated(forRemoval = true) public class ClientQueryResult extends ClientObject implements QueryResult {
-
-    /** The current session */
-    private Session session;
-
-    /** The adapted remote query result. */
-    private RemoteQueryResult remote;
-
-    /**
-     * Creates a client adapter for the given remote query result.
-     *
-     * @param session current session
-     * @param remote remote query result
-     * @param factory adapter factory
-     */
-    public ClientQueryResult(
-            Session session, RemoteQueryResult remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public String[] getColumnNames() throws RepositoryException {
-        try {
-            return remote.getColumnNames();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public RowIterator getRows() throws RepositoryException {
-        try {
-            return getFactory().getRowIterator(session, remote.getRows());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator getNodes() throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(session, remote.getNodes());
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getSelectorNames() throws RepositoryException {
-        try {
-            return remote.getSelectorNames();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java
deleted file mode 100644
index 07285c7c9..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepository.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.jcr.Credentials;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-
-import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-import org.apache.jackrabbit.rmi.remote.RemoteSession;
-import org.apache.jackrabbit.rmi.value.SerialValueFactory;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository}
- * interface. This class makes a remote repository locally available using
- * the JCR {@link javax.jcr.Repository Repository} interface.
- *
- * @see javax.jcr.Repository
- * @see org.apache.jackrabbit.rmi.remote.RemoteRepository
- */
-@Deprecated(forRemoval = true) public class ClientRepository implements Repository {
-
-    /**
-     * The set of standard descriptor keys defined in the
-     * {@link Repository} interface. 
-     */
-    private static final Set<String> STANDARD_KEYS = new HashSet<String>() {{
-        add(Repository.IDENTIFIER_STABILITY);
-        add(Repository.LEVEL_1_SUPPORTED);
-        add(Repository.LEVEL_2_SUPPORTED);
-        add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE);
-        add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES);
-        add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED);
-        add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED);
-        add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED);
-        add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED);
-        add(Repository.OPTION_LIFECYCLE_SUPPORTED);
-        add(Repository.OPTION_LOCKING_SUPPORTED);
-        add(Repository.OPTION_OBSERVATION_SUPPORTED);
-        add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED);
-        add(Repository.OPTION_QUERY_SQL_SUPPORTED);
-        add(Repository.OPTION_RETENTION_SUPPORTED);
-        add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED);
-        add(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED);
-        add(Repository.OPTION_TRANSACTIONS_SUPPORTED);
-        add(Repository.OPTION_UNFILED_CONTENT_SUPPORTED);
-        add(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED);
-        add(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED);
-        add(Repository.OPTION_VERSIONING_SUPPORTED);
-        add(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED);
-        add(Repository.OPTION_XML_EXPORT_SUPPORTED);
-        add(Repository.OPTION_XML_IMPORT_SUPPORTED);
-        add(Repository.OPTION_ACTIVITIES_SUPPORTED);
-        add(Repository.OPTION_BASELINES_SUPPORTED);
-        
-        add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED);
-        add(Repository.QUERY_JOINS);
-        add(Repository.QUERY_LANGUAGES);
-        add(Repository.QUERY_STORED_QUERIES_SUPPORTED);
-        add(Repository.QUERY_XPATH_DOC_ORDER);
-        add(Repository.QUERY_XPATH_POS_INDEX);
-        add(Repository.REP_NAME_DESC);
-        add(Repository.REP_VENDOR_DESC);
-        add(Repository.REP_VENDOR_URL_DESC);
-        add(Repository.SPEC_NAME_DESC);
-        add(Repository.SPEC_VERSION_DESC);
-        add(Repository.WRITE_SUPPORTED);
-    }};
-
-    /** The adapted remote repository. */
-    private final RemoteRepository remote;
-
-    /** Local adapter factory. */
-    private final LocalAdapterFactory factory;
-
-    /**
-     * Creates a client adapter for the given remote repository.
-     *
-     * @param remote remote repository
-     * @param factory local adapter factory
-     */
-    public ClientRepository(
-            RemoteRepository remote, LocalAdapterFactory factory) {
-        this.remote = remote;
-        this.factory = factory;
-    }
-
-    /** {@inheritDoc} */
-    public String getDescriptor(String name) {
-        try {
-            return remote.getDescriptor(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Value getDescriptorValue(String key) {
-        String descriptor = getDescriptor(key);
-        if (descriptor != null) {
-            return SerialValueFactory.getInstance().createValue(descriptor);
-        } else {
-            return null;
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Value[] getDescriptorValues(String key) {
-        try {
-            return remote.getDescriptorValues(key);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getDescriptorKeys() {
-        try {
-            return remote.getDescriptorKeys();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isSingleValueDescriptor(String key) {
-        return getDescriptor(key) != null;
-    }
-
-    /** {@inheritDoc} */
-    public Session login(Credentials credentials, String workspace)
-            throws RepositoryException {
-        try {
-            RemoteSession session = remote.login(credentials, workspace);
-            return factory.getSession(this, session);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * Returns true if the given key identifies a standard descriptor.
-     *
-     * @param key descriptor key
-     * @return <code>true</code> if the key identifies a standard descriptor,
-     *         <code>false</code> otherwise
-     */
-    public boolean isStandardDescriptor(String key) {
-        return STANDARD_KEYS.contains(key);
-    }
-
-    /**
-     * Calls {@link Repository#login(Credentials, String)} with
-     * <code>null</code> arguments.
-     *
-     * @return logged in session
-     * @throws RepositoryException if an error occurs
-     */
-    public Session login() throws RepositoryException {
-        return login(null, null);
-    }
-
-    /**
-     * Calls {@link Repository#login(Credentials, String)} with
-     * the given credentials and a <code>null</code> workspace name.
-     *
-     * @param credentials login credentials
-     * @return logged in session
-     * @throws RepositoryException if an error occurs
-     */
-    public Session login(Credentials credentials) throws RepositoryException {
-        return login(credentials, null);
-    }
-
-    /**
-     * Calls {@link Repository#login(Credentials, String)} with
-     * <code>null</code> credentials and the given workspace name.
-     *
-     * @param workspace workspace name
-     * @return logged in session
-     * @throws RepositoryException if an error occurs
-     */
-    public Session login(String workspace) throws RepositoryException {
-        return login(null, workspace);
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java
deleted file mode 100644
index dd7856368..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRepositoryFactory.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.net.MalformedURLException;
-import java.rmi.Naming;
-import java.rmi.NotBoundException;
-import java.rmi.RemoteException;
-import java.util.Hashtable;
-
-import javax.jcr.Repository;
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.RefAddr;
-import javax.naming.Reference;
-import javax.naming.spi.ObjectFactory;
-
-import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Object factory for JCR-RMI clients. This factory can be used either
- * directly or as a JNDI object factory.
- *
- * @see ClientRepository
- */
-@Deprecated(forRemoval = true) public class ClientRepositoryFactory implements ObjectFactory {
-
-    /**
-     * The JNDI parameter name for configuring the RMI URL of
-     * a remote repository.
-     */
-    public static final String URL_PARAMETER = "url";
-
-    /**
-     * Local adapter factory.
-     */
-    private LocalAdapterFactory factory;
-
-    /**
-     * Creates a JCR-RMI client factory with the default adapter factory.
-     */
-    public ClientRepositoryFactory() {
-        this(new ClientAdapterFactory());
-    }
-
-    /**
-     * Creates a JCR-RMI client factory with the given adapter factory.
-     *
-     * @param factory local adapter factory
-     */
-    public ClientRepositoryFactory(LocalAdapterFactory factory) {
-        this.factory = factory;
-    }
-
-    /**
-     * Returns a client wrapper for a remote content repository. The remote
-     * repository is looked up from the RMI registry using the given URL by
-     * the returned {@link SafeClientRepository} instance.
-     * <p>
-     * The current implementation of this method will not throw any of the
-     * declared exceptions (because of the {@link SafeClientRepository} being
-     * used), but the throws clauses are kept for backwards compatibility and
-     * potential future use. Clients should be prepared to handle exceptions
-     * from this method.
-     *
-     * @param url the RMI URL of the remote repository
-     * @return repository client
-     * @throws MalformedURLException if the given URL is malfored
-     * @throws NotBoundException if the given URL points to nothing
-     * @throws ClassCastException if the given URL points to something unknown
-     * @throws RemoteException if the remote repository can not be accessed
-     */
-    public Repository getRepository(final String url)
-            throws MalformedURLException, NotBoundException,
-            ClassCastException, RemoteException {
-        return new SafeClientRepository(factory) {
-
-            protected RemoteRepository getRemoteRepository()
-                    throws RemoteException {
-                try {
-                    return (RemoteRepository) Naming.lookup(url);
-                } catch (MalformedURLException e) {
-                    throw new RemoteException("Malformed URL: " + url, e);
-                } catch (NotBoundException e) {
-                    throw new RemoteException("No target found: " + url, e);
-                } catch (ClassCastException e) {
-                    throw new RemoteException("Unknown target: " + url, e);
-                }
-            }
-
-        };
-    }
-
-    /**
-     * JNDI factory method for creating JCR-RMI clients. Creates a lazy
-     * client repository instance that uses the reference parameter "url"
-     * as the RMI URL where the remote repository is looked up when accessed.
-     *
-     * @param object      reference parameters
-     * @param name        unused
-     * @param context     unused
-     * @param environment unused
-     * @return repository client
-     */
-    public Object getObjectInstance(
-            Object object, Name name, Context context, Hashtable environment) {
-        if (object instanceof Reference) {
-            Reference reference = (Reference) object;
-            RefAddr url = reference.get(URL_PARAMETER);
-            if (url != null && url.getContent() != null) {
-                try {
-                    return getRepository(url.getContent().toString());
-                } catch (Exception e) {
-                    return null;
-                }
-            }
-        }
-        return null;
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java
deleted file mode 100644
index 38701da76..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientRow.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-import javax.jcr.query.Row;
-
-import org.apache.jackrabbit.rmi.remote.RemoteRow;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteRow RemoteRow}
- * interface. This class makes a remote query row locally available using
- * the JCR {@link Row Row} interface.
- *
- * @see javax.jcr.query.Row Row
- * @see org.apache.jackrabbit.rmi.remote.RemoteRow
- */
-@Deprecated(forRemoval = true) public class ClientRow extends ClientObject implements Row {
-
-    /** Current session. */
-    private Session session;
-
-    /** The remote query row. */
-    private RemoteRow remote;
-
-    /**
-     * Creates a client adapter for the given remote query row.
-     *
-     * @param remote remote query row
-     */
-    public ClientRow(Session session, RemoteRow remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public Value[] getValues() throws RepositoryException {
-        try {
-            return remote.getValues();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Value getValue(String s) throws RepositoryException {
-        try {
-            return remote.getValue(s);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getNode() throws RepositoryException {
-        try {
-            return getFactory().getNode(session, remote.getNode());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getNode(String selectorName) throws RepositoryException {
-        try {
-            return getFactory().getNode(session, remote.getNode(selectorName));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getPath() throws RepositoryException {
-        try {
-            return remote.getPath();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getPath(String selectorName) throws RepositoryException {
-        try {
-            return remote.getPath(selectorName);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public double getScore() throws RepositoryException {
-        try {
-            return remote.getScore();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public double getScore(String selectorName) throws RepositoryException {
-        try {
-            return remote.getScore(selectorName);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java
deleted file mode 100644
index a07769bbd..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientSession.java
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.rmi.RemoteException;
-import java.security.AccessControlException;
-
-import javax.jcr.Credentials;
-import javax.jcr.Item;
-import javax.jcr.Node;
-import javax.jcr.Property;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.ValueFactory;
-import javax.jcr.Workspace;
-import javax.jcr.retention.RetentionManager;
-import javax.jcr.security.AccessControlManager;
-import javax.xml.transform.Result;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXResult;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.jackrabbit.rmi.remote.RemoteSession;
-import org.apache.jackrabbit.rmi.value.SerialValueFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteSession RemoteSession}
- * interface. This class makes a remote session locally available using
- * the JCR {@link javax.jcr.Session Session} interface.
- *
- * @see javax.jcr.Session
- * @see org.apache.jackrabbit.rmi.remote.RemoteSession
- */
-@Deprecated(forRemoval = true) public class ClientSession extends ClientObject implements Session {
-
-    /**
-     * Logger instance.
-     */
-    private static final Logger log =
-        LoggerFactory.getLogger(ClientSession.class);
-
-    /** The current repository. */
-    private final Repository repository;
-
-    /**
-     * Flag indicating whether the session is to be considered live of not.
-     * This flag is initially set to <code>true</code> and reset to
-     * <code>false</code> by the {@link #logout()} method. The {@link #isLive()}
-     * method first checks this flag before asking the remote session.
-     */
-    private boolean live = true;
-
-    /** The adapted remote session. */
-    protected final RemoteSession remote;
-
-    /**
-     * The adapted workspace of this session. This field is set on the first
-     * call to the {@link #getWorkspace()} method assuming, that a workspace
-     * instance is not changing during the lifetime of a session, that is,
-     * each call to the server-side <code>Session.getWorkspace()</code> allways
-     * returns the same object.
-     */
-    private Workspace workspace;
-
-    /**
-     * Creates a client adapter for the given remote session.
-     *
-     * @param repository current repository
-     * @param remote remote repository
-     * @param factory local adapter factory
-     */
-    public ClientSession(Repository repository, RemoteSession remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.repository = repository;
-        this.remote = remote;
-    }
-
-    /**
-     * Returns the current repository without contacting the remote session.
-     *
-     * {@inheritDoc}
-     */
-    public Repository getRepository() {
-        return repository;
-    }
-
-    /** {@inheritDoc} */
-    public String getUserID() {
-        try {
-            return remote.getUserID();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Object getAttribute(String name) {
-        try {
-            return remote.getAttribute(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getAttributeNames() {
-        try {
-            return remote.getAttributeNames();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Workspace getWorkspace() {
-        if (workspace == null) {
-            try {
-                workspace =
-                    getFactory().getWorkspace(this, remote.getWorkspace());
-            } catch (RemoteException ex) {
-                throw new RemoteRuntimeException(ex);
-            }
-        }
-
-        return workspace;
-    }
-
-    /** {@inheritDoc} */
-    public Session impersonate(Credentials credentials)
-            throws RepositoryException {
-        try {
-            RemoteSession session = remote.impersonate(credentials);
-            return getFactory().getSession(repository, session);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getRootNode() throws RepositoryException {
-        try {
-            return getNode(this, remote.getRootNode());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getNodeByIdentifier(String id) throws RepositoryException {
-        try {
-            return getNode(this, remote.getNodeByIdentifier(id));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getNodeByUUID(String uuid) throws RepositoryException {
-        try {
-            return getNode(this, remote.getNodeByUUID(uuid));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Item getItem(String path) throws RepositoryException {
-        try {
-            return getItem(this, remote.getItem(path));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getNode(String path) throws RepositoryException {
-        try {
-            return getNode(this, remote.getNode(path));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Property getProperty(String path) throws RepositoryException {
-        try {
-            return (Property) getItem(this, remote.getProperty(path));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean itemExists(String path) throws RepositoryException {
-        try {
-            return remote.itemExists(path);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean nodeExists(String path) throws RepositoryException {
-        try {
-            return remote.nodeExists(path);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean propertyExists(String path) throws RepositoryException {
-        try {
-            return remote.propertyExists(path);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeItem(String path) throws RepositoryException {
-        try {
-            remote.removeItem(path);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void move(String from, String to) throws RepositoryException {
-        try {
-            remote.move(from, to);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void save() throws RepositoryException {
-        try {
-            remote.save();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void refresh(boolean keepChanges) throws RepositoryException {
-        try {
-            remote.refresh(keepChanges);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasPendingChanges() throws RepositoryException {
-        try {
-            return remote.hasPendingChanges();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * Returns the {@link SerialValueFactory#getInstance()}.
-     *
-     * {@inheritDoc}
-     */
-    public ValueFactory getValueFactory() {
-        return SerialValueFactory.getInstance();
-    }
-
-    /** {@inheritDoc} */
-    public void checkPermission(String path, String actions)
-            throws AccessControlException, RepositoryException {
-        if (!hasPermission(path, actions)) {
-            throw new AccessControlException(
-                    "No permission for " + actions + " on " + path);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasPermission(String path, String actions)
-            throws RepositoryException {
-        try {
-            return remote.hasPermission(path, actions);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void importXML(String path, InputStream xml, int mode)
-            throws IOException, RepositoryException {
-        try {
-            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-            byte[] bytes = new byte[4096];
-            for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) {
-                buffer.write(bytes, 0, n);
-            }
-            remote.importXML(path, buffer.toByteArray(), mode);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        } finally {
-            // JCR-2903
-            try { xml.close(); } catch (IOException ignore) {}
-        }
-    }
-
-    /** {@inheritDoc} */
-    public ContentHandler getImportContentHandler(
-            final String path, final int mode) throws RepositoryException {
-        getItem(path); // Check that the path exists
-        try {
-            final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-            ContentHandler handler =
-                SerializingContentHandler.getSerializer(buffer);
-            return new DefaultContentHandler(handler) {
-                public void endDocument() throws SAXException {
-                    super.endDocument();
-                    try {
-                        remote.importXML(path, buffer.toByteArray(), mode);
-                    } catch (Exception e) {
-                        throw new SAXException("XML import failed", e);
-                    }
-                }
-            };
-        } catch (SAXException e) {
-            throw new RepositoryException("XML serialization failed", e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void setNamespacePrefix(String prefix, String uri)
-            throws RepositoryException {
-        try {
-            remote.setNamespacePrefix(prefix, uri);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getNamespacePrefixes() throws RepositoryException {
-        try {
-            return remote.getNamespacePrefixes();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getNamespaceURI(String prefix) throws RepositoryException {
-        try {
-            return remote.getNamespaceURI(prefix);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getNamespacePrefix(String uri) throws RepositoryException {
-        try {
-            return remote.getNamespacePrefix(uri);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void logout() {
-
-        // ignore if we are not alive any more.
-        if (!isLive()) {
-            return;
-        }
-
-        try {
-            remote.logout();
-        } catch (RemoteException ex) {
-            // JCRRMI-3: Just log a warning, the connection is dead anyway
-            log.warn("Remote logout failed", ex);
-        } finally {
-            // mark "dead"
-            live = false;
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void addLockToken(String name) {
-        try {
-            remote.addLockToken(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getLockTokens() {
-        try {
-            return remote.getLockTokens();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeLockToken(String name) {
-        try {
-            remote.removeLockToken(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /**
-     * Exports the XML system view of the specified repository location
-     * to the given XML content handler. This method first requests the
-     * raw XML data from the remote session, and then uses an identity
-     * transformation to feed the data to the given XML content handler.
-     * Possible IO and transformer exceptions are thrown as SAXExceptions.
-     *
-     * {@inheritDoc}
-     */
-    public void exportSystemView(
-            String path, ContentHandler handler,
-            boolean binaryAsLink, boolean noRecurse)
-            throws SAXException, RepositoryException {
-        try {
-            byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse);
-
-            Source source = new StreamSource(new ByteArrayInputStream(xml));
-            Result result = new SAXResult(handler);
-
-            TransformerFactory factory = TransformerFactory.newInstance();
-            Transformer transformer = factory.newTransformer();
-            transformer.transform(source, result);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        } catch (IOException ex) {
-            throw new SAXException(ex);
-        } catch (TransformerConfigurationException ex) {
-            throw new SAXException(ex);
-        } catch (TransformerException ex) {
-            throw new SAXException(ex);
-        }
-    }
-
-    /**
-     * Exports the XML system view of the specified repository location
-     * to the given output stream. This method first requests the
-     * raw XML data from the remote session, and then writes the data to
-     * the output stream.
-     *
-     * {@inheritDoc}
-     */
-    public void exportSystemView(
-            String path, OutputStream output,
-            boolean binaryAsLink, boolean noRecurse)
-            throws IOException, RepositoryException {
-        try {
-            byte[] xml = remote.exportSystemView(path, binaryAsLink, noRecurse);
-            output.write(xml);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * Exports the XML document view of the specified repository location
-     * to the given XML content handler. This method first requests the
-     * raw XML data from the remote session, and then uses an identity
-     * transformation to feed the data to the given XML content handler.
-     * Possible IO and transformer exceptions are thrown as SAXExceptions.
-     *
-     * {@inheritDoc}
-     */
-    public void exportDocumentView(
-            String path, ContentHandler handler,
-            boolean binaryAsLink, boolean noRecurse)
-            throws SAXException, RepositoryException {
-        try {
-            byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse);
-
-            Source source = new StreamSource(new ByteArrayInputStream(xml));
-            Result result = new SAXResult(handler);
-
-            TransformerFactory factory = TransformerFactory.newInstance();
-            Transformer transformer = factory.newTransformer();
-            transformer.transform(source, result);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        } catch (IOException ex) {
-            throw new SAXException(ex);
-        } catch (TransformerConfigurationException ex) {
-            throw new SAXException(ex);
-        } catch (TransformerException ex) {
-            throw new SAXException(ex);
-        }
-    }
-
-    /**
-     * Exports the XML document view of the specified repository location
-     * to the given output stream. This method first requests the
-     * raw XML data from the remote session, and then writes the data to
-     * the output stream.
-     *
-     * {@inheritDoc}
-     */
-    public void exportDocumentView(
-            String path, OutputStream output,
-            boolean binaryAsLink, boolean noRecurse)
-            throws IOException, RepositoryException {
-        try {
-            byte[] xml = remote.exportDocumentView(path, binaryAsLink, noRecurse);
-            output.write(xml);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isLive() {
-        try {
-            return live && remote.isLive();
-        } catch (RemoteException e) {
-            log.warn("Failed to test remote session state", e);
-            return false;
-        }
-    }
-
-    public AccessControlManager getAccessControlManager()
-            throws UnsupportedRepositoryOperationException, RepositoryException {
-        try {
-            return getFactory().getAccessControlManager(
-                remote.getAccessControlManager());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public RetentionManager getRetentionManager()
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-    public boolean hasCapability(
-            String methodName, Object target, Object[] arguments)
-            throws RepositoryException {
-        throw new UnsupportedRepositoryOperationException("TODO: JCR-3206");
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java
deleted file mode 100644
index c48b605a7..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersion.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-import java.util.Calendar;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionHistory;
-
-import org.apache.jackrabbit.rmi.remote.RemoteVersion;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteVersion RemoteVersion}
- * interface. This class makes a remote version locally available using
- * the JCR {@link javax.jcr.version.Version Version} interface.
- *
- * @see javax.jcr.version.Version
- * @see org.apache.jackrabbit.rmi.remote.RemoteVersion
- */
-@Deprecated(forRemoval = true) public class ClientVersion extends ClientNode implements Version {
-
-    /** The adapted remote version. */
-    private RemoteVersion remote;
-
-    /**
-     * Creates a local adapter for the given remote version.
-     *
-     * @param session current session
-     * @param remote  remote version
-     * @param factory local adapter factory
-     */
-    public ClientVersion(Session session, RemoteVersion remote,
-        LocalAdapterFactory factory) {
-        super(session, remote, factory);
-        this.remote = remote;
-    }
-
-    /**
-     * Utility method for creating a version array for an array
-     * of remote versions. The versions in the returned array
-     * are created using the local adapter factory.
-     * <p>
-     * A <code>null</code> input is treated as an empty array.
-     *
-     * @param remotes remote versions
-     * @return local version array
-     */
-    private Version[] getVersionArray(RemoteVersion[] remotes) {
-        if (remotes != null) {
-            Version[] versions = new Version[remotes.length];
-            for (int i = 0; i < remotes.length; i++) {
-                versions[i] = getFactory().getVersion(getSession(), remotes[i]);
-            }
-            return versions;
-        } else {
-            return new Version[0]; // for safety
-        }
-    }
-
-
-    /** {@inheritDoc} */
-    public Calendar getCreated() throws RepositoryException {
-        try {
-            return remote.getCreated();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version[] getSuccessors() throws RepositoryException {
-        try {
-            return getVersionArray(remote.getSuccessors());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version[] getPredecessors() throws RepositoryException {
-        try {
-            return getVersionArray(remote.getPredecessors());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public VersionHistory getContainingHistory() throws RepositoryException {
-        try {
-            return getFactory().getVersionHistory(getSession(), remote.getContainingHistory());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-   }
-
-    /** {@inheritDoc} */
-    public Node getFrozenNode() throws RepositoryException {
-        try {
-            return getFactory().getNode(getSession(), remote.getFrozenNode());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version getLinearPredecessor() throws RepositoryException {
-        try {
-            RemoteVersion linearPredecessor = remote.getLinearPredecessor();
-            if (linearPredecessor == null) {
-                return null;
-            } else {
-                return getFactory().getVersion(getSession(), linearPredecessor);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version getLinearSuccessor() throws RepositoryException {
-        try {
-            RemoteVersion linearSuccessor = remote.getLinearSuccessor();
-            if (linearSuccessor == null) {
-                return null;
-            } else {
-                return getFactory().getVersion(getSession(), linearSuccessor);
-            }
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java
deleted file mode 100644
index 6e6887b8d..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionHistory.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionException;
-import javax.jcr.version.VersionHistory;
-import javax.jcr.version.VersionIterator;
-
-import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteVersionHistory RemoteVersionHistory}
- * interface. This class makes a remote version history locally available using
- * the JCR {@link javax.jcr.version.VersionHistory VersionHistory} interface.
- *
- * @see javax.jcr.version.VersionHistory
- * @see org.apache.jackrabbit.rmi.remote.RemoteVersionHistory
- */
-@Deprecated(forRemoval = true) public class ClientVersionHistory extends ClientNode implements VersionHistory {
-
-    /** The adapted remote version history. */
-    private RemoteVersionHistory remote;
-
-    /**
-     * Creates a local adapter for the given remote version history.
-     *
-     * @param session current session
-     * @param remote  remote version history
-     * @param factory local adapter factory
-     */
-    public ClientVersionHistory(Session session, RemoteVersionHistory remote,
-        LocalAdapterFactory factory) {
-        super(session, remote, factory);
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public Version getRootVersion() throws RepositoryException {
-        try {
-            return getFactory().getVersion(getSession(), remote.getRootVersion());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public VersionIterator getAllVersions() throws RepositoryException {
-        try {
-            return getFactory().getVersionIterator(
-                    getSession(), remote.getAllVersions());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version getVersion(String versionName) throws VersionException,
-        RepositoryException {
-        try {
-            return getFactory().getVersion(getSession(), remote.getVersion(versionName));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version getVersionByLabel(String label) throws RepositoryException {
-        try {
-            return getFactory().getVersion(getSession(), remote.getVersionByLabel(label));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void addVersionLabel(String versionName, String label,
-            boolean moveLabel) throws VersionException, RepositoryException {
-        try {
-            remote.addVersionLabel(versionName, label, moveLabel);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeVersionLabel(String label)
-            throws VersionException, RepositoryException {
-        try {
-            remote.removeVersionLabel(label);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasVersionLabel(String label) throws RepositoryException {
-        try {
-            return remote.hasVersionLabel(label);
-        } catch (RemoteException ex) {
-            // grok the exception and assume label is missing
-            return false;
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasVersionLabel(Version version, String label)
-            throws VersionException, RepositoryException {
-        try {
-            String versionIdentifier = version.getIdentifier();
-            return remote.hasVersionLabel(versionIdentifier, label);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getVersionLabels() throws RepositoryException {
-        try {
-            return remote.getVersionLabels();
-        } catch (RemoteException ex) {
-            // grok the exception and return an empty array
-            return new String[0];
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getVersionLabels(Version version)
-            throws VersionException, RepositoryException {
-        try {
-            String versionIdentifier = version.getIdentifier();
-            return remote.getVersionLabels(versionIdentifier);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeVersion(String versionName)
-            throws UnsupportedRepositoryOperationException, VersionException,
-            RepositoryException {
-        try {
-            remote.removeVersion(versionName);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc}
-     * @deprecated As of JCR 2.0, {@link #getVersionableIdentifier} should be
-     *             used instead.
-     */
-    public String getVersionableUUID() throws RepositoryException {
-        try {
-            return remote.getVersionableUUID();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator getAllFrozenNodes() throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(getSession(), remote.getAllFrozenNodes());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator getAllLinearFrozenNodes() throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(getSession(), remote.getAllLinearFrozenNodes());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public VersionIterator getAllLinearVersions() throws RepositoryException {
-        try {
-            return getFactory().getVersionIterator(getSession(), remote.getAllLinearVersions());
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String getVersionableIdentifier() throws RepositoryException {
-        try {
-            return remote.getVersionableIdentifier();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java
deleted file mode 100644
index 502146b85..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientVersionManager.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionHistory;
-import javax.jcr.version.VersionManager;
-
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteVersionManager;
-
-@Deprecated(forRemoval = true) public class ClientVersionManager extends ClientObject
-        implements VersionManager {
-
-    /** The current session. */
-    private Session session;
-
-    private RemoteVersionManager remote;
-
-    public ClientVersionManager(
-            Session session, RemoteVersionManager remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /** {@inheritDoc} */
-    public void cancelMerge(String absPath, Version version)
-            throws RepositoryException {
-        try {
-            remote.cancelMerge(absPath, version.getIdentifier());
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version checkin(String absPath) throws RepositoryException {
-        try {
-            return getFactory().getVersion(session, remote.checkin(absPath));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void checkout(String absPath) throws RepositoryException {
-        try {
-            remote.checkout(absPath);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version checkpoint(String absPath) throws RepositoryException {
-        try {
-            return getFactory().getVersion(session, remote.checkpoint(absPath));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node createActivity(String title)
-            throws RepositoryException {
-        try {
-            return getFactory().getNode(session, remote.createActivity(title));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node createConfiguration(String absPath)
-            throws RepositoryException {
-        try {
-            return getFactory().getNode(
-                    session, remote.createConfiguration(absPath));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void doneMerge(String absPath, Version version)
-            throws RepositoryException {
-        try {
-            remote.doneMerge(absPath, version.getIdentifier());
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node getActivity() throws RepositoryException {
-        try {
-            RemoteNode activity = remote.getActivity();
-            if (activity == null) {
-                return null;
-            } else {
-                return getFactory().getNode(session, activity);
-            }
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Version getBaseVersion(String absPath) throws RepositoryException {
-        try {
-            return getFactory().getVersion(
-                    session, remote.getBaseVersion(absPath));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public VersionHistory getVersionHistory(String absPath)
-            throws RepositoryException {
-        try {
-            return getFactory().getVersionHistory(
-                    session, remote.getVersionHistory(absPath));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean isCheckedOut(String absPath) throws RepositoryException {
-        try {
-            return remote.isCheckedOut(absPath);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator merge(Node activityNode) throws RepositoryException {
-        try {
-            RemoteIterator iterator = remote.merge(activityNode.getIdentifier());
-            return getFactory().getNodeIterator(session, iterator);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator merge(
-            String absPath, String srcWorkspace, boolean bestEffort)
-            throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(
-                    session, remote.merge(absPath, srcWorkspace, bestEffort));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeIterator merge(
-            String absPath, String srcWorkspace, boolean bestEffort,
-            boolean isShallow) throws RepositoryException {
-        try {
-            return getFactory().getNodeIterator(session, remote.merge(
-                    absPath, srcWorkspace, bestEffort, isShallow));
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void removeActivity(Node activityNode) throws RepositoryException {
-        try {
-            remote.removeActivity(activityNode.getIdentifier());
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(Version[] versions, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            String[] versionIdentifiers = new String[versions.length];
-            for (int i = 0; i < versions.length; i++) {
-                versionIdentifiers[i] = versions[i].getIdentifier();
-            }
-            remote.restore(versionIdentifiers, removeExisting);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(Version version, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restore(version.getIdentifier(), removeExisting);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(
-            String absPath, String versionName, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restore(absPath, versionName, removeExisting);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(String absPath, Version version, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restoreVI(absPath, version.getIdentifier(), removeExisting);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restoreByLabel(
-            String absPath, String versionLabel, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.restoreByLabel(absPath, versionLabel, removeExisting);
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Node setActivity(Node activity) throws RepositoryException {
-        try {
-            RemoteNode remoteActivity;
-            if (activity == null) {
-                remoteActivity = remote.setActivity(null);
-            } else {
-                remoteActivity = remote.setActivity(activity.getIdentifier());
-            }
-            if (remoteActivity == null) {
-                return null;
-            } else {
-                return getFactory().getNode(session, remoteActivity);
-            }
-        } catch (RemoteException e) {
-            throw new RemoteRepositoryException(e);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java
deleted file mode 100644
index ec8e74e53..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientWorkspace.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.rmi.RemoteException;
-
-import javax.jcr.NamespaceRegistry;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Workspace;
-import javax.jcr.lock.LockManager;
-import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.observation.ObservationManager;
-import javax.jcr.query.QueryManager;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionManager;
-
-import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager;
-import org.apache.jackrabbit.rmi.remote.RemoteQueryManager;
-import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteWorkspace RemoteWorkspace}
- * interface. This class makes a remote workspace locally available using
- * the JCR {@link Workspace Workspace} interface.
- *
- * @see javax.jcr.Workspace
- * @see org.apache.jackrabbit.rmi.remote.RemoteWorkspace
- */
-@Deprecated(forRemoval = true) public class ClientWorkspace extends ClientObject implements Workspace {
-
-    /** The current session. */
-    private Session session;
-
-    /** The adapted remote workspace. */
-    private RemoteWorkspace remote;
-
-    /**
-     * The adapted observation manager of this workspace. This field is set on
-     * the first call to the {@link #getObservationManager()()} method assuming,
-     * that the observation manager instance is not changing during the lifetime
-     * of a workspace instance, that is, each call to the server-side
-     * <code>Workspace.getObservationManager()</code> allways returns the same
-     * object.
-     */
-    private ObservationManager observationManager;
-
-    private LockManager lockManager;
-
-    private VersionManager versionManager;
-
-    /**
-     * Creates a client adapter for the given remote workspace.
-     *
-     * @param session current session
-     * @param remote remote workspace
-     * @param factory local adapter factory
-     */
-    public ClientWorkspace(
-            Session session, RemoteWorkspace remote,
-            LocalAdapterFactory factory) {
-        super(factory);
-        this.session = session;
-        this.remote = remote;
-    }
-
-    /**
-     * Returns the current session without contacting the remote workspace.
-     *
-     * {@inheritDoc}
-     */
-    public Session getSession() {
-        return session;
-    }
-
-    /** {@inheritDoc} */
-    public String getName() {
-        try {
-            return remote.getName();
-        } catch (RemoteException ex) {
-            throw new RemoteRuntimeException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void copy(String from, String to) throws RepositoryException {
-        try {
-            remote.copy(from, to);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void copy(String workspace, String from, String to)
-            throws RepositoryException {
-        try {
-            remote.copy(workspace, from, to);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void move(String from, String to) throws RepositoryException {
-        try {
-            remote.move(from, to);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public QueryManager getQueryManager() throws RepositoryException {
-        try {
-            RemoteQueryManager manager = remote.getQueryManager();
-            return getFactory().getQueryManager(session, manager);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NamespaceRegistry getNamespaceRegistry() throws RepositoryException {
-        try {
-            RemoteNamespaceRegistry registry = remote.getNamespaceRegistry();
-            return getFactory().getNamespaceRegistry(registry);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public NodeTypeManager getNodeTypeManager() throws RepositoryException {
-        try {
-            RemoteNodeTypeManager manager = remote.getNodeTypeManager();
-            return getFactory().getNodeTypeManager(manager);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public ObservationManager getObservationManager()
-            throws RepositoryException {
-        if (observationManager == null) {
-            try {
-                observationManager =
-                    getFactory().
-                        getObservationManager(this, remote.getObservationManager());
-            } catch (RemoteException ex) {
-                throw new RemoteRepositoryException(ex);
-            }
-        }
-
-        return observationManager;
-    }
-
-    /** {@inheritDoc} */
-    public void clone(
-            String workspace, String src, String dst, boolean removeExisting)
-            throws RepositoryException {
-        try {
-            remote.clone(workspace, src, dst, removeExisting);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public String[] getAccessibleWorkspaceNames() throws RepositoryException {
-        try {
-            return remote.getAccessibleWorkspaceNames();
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public ContentHandler getImportContentHandler(
-            final String path, final int mode) throws RepositoryException {
-        getSession().getItem(path); // Check that the path exists
-        try {
-            final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-            return new DefaultContentHandler(
-                    SerializingContentHandler.getSerializer(buffer)) {
-                public void endDocument() throws SAXException {
-                    super.endDocument();
-                    try {
-                        remote.importXML(path, buffer.toByteArray(), mode);
-                    } catch (Exception e) {
-                        throw new SAXException("XML import failed", e);
-                    }
-                }
-            };
-        } catch (SAXException e) {
-            throw new RepositoryException("XML serialization failed", e);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void importXML(String path, InputStream xml, int uuidBehaviour)
-            throws IOException, RepositoryException {
-        try {
-            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-            byte[] bytes = new byte[4096];
-            for (int n = xml.read(bytes); n != -1; n = xml.read(bytes)) {
-                buffer.write(bytes, 0, n);
-            }
-            remote.importXML(path, buffer.toByteArray(), uuidBehaviour);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        } finally {
-            // JCR-2903
-            try { xml.close(); } catch (IOException ignore) {}
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void restore(Version[] versions, boolean removeExisting)
-            throws RepositoryException {
-        getVersionManager().restore(versions, removeExisting);
-    }
-
-    public void createWorkspace(String name) throws RepositoryException {
-        try {
-            remote.createWorkspace(name, null);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public void createWorkspace(String name, String srcWorkspace)
-            throws RepositoryException {
-        try {
-            remote.createWorkspace(name, srcWorkspace);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    public void deleteWorkspace(String name) throws RepositoryException {
-        try {
-            remote.deleteWorkspace(name);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public LockManager getLockManager() throws RepositoryException {
-        if (lockManager == null) {
-            try {
-                lockManager = getFactory().getLockManager(
-                        session, remote.getLockManager());
-            } catch (RemoteException ex) {
-                throw new RemoteRepositoryException(ex);
-            }
-        }
-
-        return lockManager;
-    }
-
-    public VersionManager getVersionManager() throws RepositoryException {
-        if (versionManager == null) {
-            try {
-                versionManager = getFactory().getVersionManager(
-                        session, remote.getVersionManager());
-            } catch (RemoteException ex) {
-                throw new RemoteRepositoryException(ex);
-            }
-        }
-
-        return versionManager;
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java
deleted file mode 100644
index d9fcb0f12..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientXASession.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import javax.jcr.Repository;
-
-import org.apache.jackrabbit.rmi.remote.RemoteXASession;
-import org.apache.jackrabbit.rmi.remote.SerializableXid;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteXASession RemoteXASession}
- * interface.
- *
- * @since 1.4
- */
-@Deprecated(forRemoval = true) public class ClientXASession extends ClientSession implements XAResource {
-
-    /**
-     * The adapted remote transaction enabled session.
-     */
-    private RemoteXASession remote;
-
-    /**
-     * Creates a client adapter for the given remote session which is
-     * transaction enabled.
-     */
-    public ClientXASession(
-            Repository repository, RemoteXASession remote,
-            LocalAdapterFactory factory) {
-        super(repository, remote, factory);
-        this.remote = remote;
-    }
-
-    /**
-     * Returns <code>true</code> if the given object is a local
-     * adapter that refers to the same remote XA resource.
-     *
-     * @see <a href="http://blogs.sun.com/fkieviet/entry/j2ee_jca_resource_adapters_the">http://blogs.sun.com/fkieviet/entry/j2ee_jca_resource_adapters_the</a>
-     */
-    public boolean isSameRM(XAResource xares) throws XAException {
-        return xares instanceof ClientXASession
-            && remote == ((ClientXASession) xares).remote;
-    }
-
-    private XAException getXAException(RemoteException e) {
-        XAException exception = new XAException("Remote operation failed");
-        exception.initCause(e);
-        return exception;
-    }
-
-    public void commit(Xid xid, boolean onePhase) throws XAException {
-        try {
-            remote.commit(new SerializableXid(xid), onePhase);
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public void end(Xid xid, int flags) throws XAException {
-        try {
-            remote.end(new SerializableXid(xid), flags);
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public void forget(Xid xid) throws XAException {
-        try {
-            remote.forget(new SerializableXid(xid));
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public int getTransactionTimeout() throws XAException {
-        try {
-            return remote.getTransactionTimeout();
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public int prepare(Xid xid) throws XAException {
-        try {
-            return remote.prepare(new SerializableXid(xid));
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public Xid[] recover(int flag) throws XAException {
-        try {
-            return remote.recover(flag);
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public void rollback(Xid xid) throws XAException {
-        try {
-            remote.rollback(new SerializableXid(xid));
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public boolean setTransactionTimeout(int seconds) throws XAException {
-        try {
-            return remote.setTransactionTimeout(seconds);
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-    public void start(Xid xid, int flags) throws XAException {
-        try {
-            remote.start(new SerializableXid(xid), flags);
-        } catch (RemoteException e) {
-            throw getXAException(e);
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java
deleted file mode 100644
index c2d1765de..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/DefaultContentHandler.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Adapter class for exposing a {@link ContentHandler} instance as
- * {@link DefaultHandler} object.
- */
-@Deprecated(forRemoval = true) class DefaultContentHandler extends DefaultHandler {
-
-    /**
-     * The adapted content handler instance.
-     */
-    private final ContentHandler handler;
-
-    /**
-     * Creates a {@link DefaultHandler} adapter for the given content
-     * handler.
-     *
-     * @param handler content handler
-     */
-    public DefaultContentHandler(ContentHandler handler) {
-        this.handler = handler;
-    }
-
-    //------------------------------------------------------< ContentHandler >
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param ch passed through
-     * @param start passed through
-     * @param length passed through
-     * @throws SAXException if an error occurs
-     */
-    public void characters(char[] ch, int start, int length)
-            throws SAXException {
-        handler.characters(ch, start, length);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @throws SAXException if an error occurs
-     */
-    public void endDocument() throws SAXException {
-        handler.endDocument();
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param namespaceURI passed through
-     * @param localName passed through
-     * @param qName passed through
-     * @throws SAXException if an error occurs
-     */
-    public void endElement(
-            String namespaceURI, String localName, String qName)
-            throws SAXException {
-        handler.endElement(namespaceURI, localName, qName);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param prefix passed through
-     * @throws SAXException if an error occurs
-     */
-    public void endPrefixMapping(String prefix) throws SAXException {
-        handler.endPrefixMapping(prefix);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param ch passed through
-     * @param start passed through
-     * @param length passed through
-     * @throws SAXException if an error occurs
-     */
-    public void ignorableWhitespace(char[] ch, int start, int length)
-            throws SAXException {
-        handler.ignorableWhitespace(ch, start, length);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param target passed through
-     * @param data passed through
-     * @throws SAXException if an error occurs
-     */
-    public void processingInstruction(String target, String data)
-            throws SAXException {
-        handler.processingInstruction(target, data);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param locator passed through
-     */
-    public void setDocumentLocator(Locator locator) {
-        handler.setDocumentLocator(locator);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param name passed through
-     * @throws SAXException if an error occurs
-     */
-    public void skippedEntity(String name) throws SAXException {
-        handler.skippedEntity(name);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @throws SAXException if an error occurs
-     */
-    public void startDocument() throws SAXException {
-        handler.startDocument();
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param namespaceURI passed through
-     * @param localName passed through
-     * @param qName passed through
-     * @param atts passed through
-     * @throws SAXException if an error occurs
-     */
-    public void startElement(
-            String namespaceURI, String localName, String qName,
-            Attributes atts) throws SAXException {
-        handler.startElement(namespaceURI, localName, qName, atts);
-    }
-
-    /**
-     * Delegated to {@link #handler}.
-     *
-     * @param prefix passed through
-     * @param uri passed through
-     * @throws SAXException if an error occurs
-     */
-    public void startPrefixMapping(String prefix, String uri)
-            throws SAXException {
-        handler.startPrefixMapping(prefix, uri);
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java
deleted file mode 100644
index 611860c07..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/LocalAdapterFactory.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.security.Principal;
-import java.util.Iterator;
-
-import javax.jcr.Item;
-import javax.jcr.NamespaceRegistry;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
-import javax.jcr.Repository;
-import javax.jcr.Session;
-import javax.jcr.Workspace;
-import javax.jcr.lock.Lock;
-import javax.jcr.lock.LockManager;
-import javax.jcr.nodetype.ItemDefinition;
-import javax.jcr.nodetype.NodeDefinition;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.nodetype.NodeTypeIterator;
-import javax.jcr.nodetype.NodeTypeManager;
-import javax.jcr.nodetype.PropertyDefinition;
-import javax.jcr.observation.ObservationManager;
-import javax.jcr.query.Query;
-import javax.jcr.query.QueryManager;
-import javax.jcr.query.QueryResult;
-import javax.jcr.query.Row;
-import javax.jcr.query.RowIterator;
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.AccessControlPolicyIterator;
-import javax.jcr.security.Privilege;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionHistory;
-import javax.jcr.version.VersionIterator;
-import javax.jcr.version.VersionManager;
-
-import org.apache.jackrabbit.rmi.remote.RemoteItem;
-import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteLock;
-import org.apache.jackrabbit.rmi.remote.RemoteLockManager;
-import org.apache.jackrabbit.rmi.remote.RemoteNamespaceRegistry;
-import org.apache.jackrabbit.rmi.remote.RemoteNode;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeTypeManager;
-import org.apache.jackrabbit.rmi.remote.RemoteObservationManager;
-import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-import org.apache.jackrabbit.rmi.remote.RemotePropertyDefinition;
-import org.apache.jackrabbit.rmi.remote.RemoteQuery;
-import org.apache.jackrabbit.rmi.remote.RemoteQueryManager;
-import org.apache.jackrabbit.rmi.remote.RemoteQueryResult;
-import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-import org.apache.jackrabbit.rmi.remote.RemoteRow;
-import org.apache.jackrabbit.rmi.remote.RemoteSession;
-import org.apache.jackrabbit.rmi.remote.RemoteVersion;
-import org.apache.jackrabbit.rmi.remote.RemoteVersionHistory;
-import org.apache.jackrabbit.rmi.remote.RemoteVersionManager;
-import org.apache.jackrabbit.rmi.remote.RemoteWorkspace;
-import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup;
-import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy;
-import org.apache.jackrabbit.rmi.remote.security.RemotePrivilege;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Factory interface for creating local adapters for remote references.
- * This interface defines how remote JCR-RMI references are adapted
- * back to the normal JCR interfaces. The adaption mechanism can be
- * modified (for example to add extra features) by changing the
- * local adapter factory used by the repository client.
- * <p>
- * Note that the
- * {@link org.apache.jackrabbit.rmi.client.ClientObject ClientObject}
- * base class provides a number of utility methods designed to work with
- * a local adapter factory. Adapter implementations may want to inherit
- * that functionality by subclassing from ClientObject.
- *
- * @see org.apache.jackrabbit.rmi.server.RemoteAdapterFactory
- * @see org.apache.jackrabbit.rmi.client.ClientAdapterFactory
- * @see org.apache.jackrabbit.rmi.client.ClientObject
- */
-@Deprecated(forRemoval = true) public interface LocalAdapterFactory {
-
-    /**
-     * Factory method for creating a local adapter for a remote repository.
-     *
-     * @param remote remote repository
-     * @return local repository adapter
-     */
-    Repository getRepository(RemoteRepository remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote session.
-     *
-     * @param repository current repository
-     * @param remote remote session
-     * @return local session adapter
-     */
-    Session getSession(Repository repository, RemoteSession remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote workspace.
-     *
-     * @param session current session
-     * @param remote remote workspace
-     * @return local workspace adapter
-     */
-    Workspace getWorkspace(Session session, RemoteWorkspace remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote observation
-     * manager.
-     *
-     * @param workspace current workspace
-     * @param remote remote observation manager
-     * @return local observation manager adapter
-     */
-    ObservationManager getObservationManager(Workspace workspace,
-        RemoteObservationManager remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote namespace
-     * registry.
-     *
-     * @param remote remote namespace registry
-     * @return local namespace registry adapter
-     */
-    NamespaceRegistry getNamespaceRegistry(RemoteNamespaceRegistry remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote node type
-     * manager.
-     *
-     * @param remote remote node type manager
-     * @return local node type manager adapter
-     */
-    NodeTypeManager getNodeTypeManager(RemoteNodeTypeManager remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote item.
-     * Note that before calling this method, the client may want to
-     * introspect the remote item reference to determine whether to use the
-     * {@link #getNode(Session, RemoteNode) getNode} or
-     * {@link #getProperty(Session, RemoteProperty) getProperty} method
-     * instead, as the adapter returned by this method will only cover
-     * the basic {@link Item Item} interface.
-     *
-     * @param session current session
-     * @param remote remote item
-     * @return local item adapter
-     */
-    Item getItem(Session session, RemoteItem remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote property.
-     *
-     * @param session current session
-     * @param remote remote property
-     * @return local property adapter
-     */
-    Property getProperty(Session session, RemoteProperty remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote node.
-     *
-     * @param session current session
-     * @param remote remote node
-     * @return local node adapter
-     */
-    Node getNode(Session session, RemoteNode remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote version.
-     *
-     * @param session current session
-     * @param remote remote version
-     * @return local version adapter
-     */
-    Version getVersion(Session session, RemoteVersion remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote version history.
-     *
-     * @param session current session
-     * @param remote remote version history
-     * @return local version history adapter
-     */
-    VersionHistory getVersionHistory(Session session, RemoteVersionHistory remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote node type.
-     *
-     * @param remote remote node type
-     * @return local node type adapter
-     */
-    NodeType getNodeType(RemoteNodeType remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote item
-     * definition. Note that before calling this method, the client may want to
-     * introspect the remote item definition to determine whether to use the
-     * {@link #getNodeDef(RemoteNodeDefinition) getNodeDef} or
-     * {@link #getPropertyDef(RemotePropertyDefinition) getPropertyDef} method
-     * instead, as the adapter returned by this method will only cover
-     * the {@link ItemDefinition ItemDef} base interface.
-     *
-     * @param remote remote item definition
-     * @return local item definition adapter
-     */
-    ItemDefinition getItemDef(RemoteItemDefinition remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote node
-     * definition.
-     *
-     * @param remote remote node definition
-     * @return local node definition adapter
-     */
-    NodeDefinition getNodeDef(RemoteNodeDefinition remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote property
-     * definition.
-     *
-     * @param remote remote property definition
-     * @return local property definition adapter
-     */
-    PropertyDefinition getPropertyDef(RemotePropertyDefinition remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote lock.
-     *
-     * @param session current session
-     * @param remote remote lock
-     * @return local lock adapter
-     */
-    Lock getLock(Session session, RemoteLock remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote query manager.
-     *
-     * @param session current session
-     * @param remote remote query manager
-     * @return local query manager adapter
-     */
-    QueryManager getQueryManager(Session session, RemoteQueryManager remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote query.
-     *
-     * @param session current session
-     * @param remote remote query
-     * @return local query adapter
-     */
-    Query getQuery(Session session, RemoteQuery remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote query result.
-     *
-     * @param session current session
-     * @param remote remote query result
-     * @return local query result adapter
-     */
-    QueryResult getQueryResult(Session session, RemoteQueryResult remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote query row.
-     *
-     * @param session current session
-     * @param remote remote query row
-     * @return local query row adapter
-     */
-    Row getRow(Session session, RemoteRow remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote node iterator.
-     *
-     * @param session current session
-     * @param remote remote node iterator
-     * @return local node iterator adapter
-     */
-    NodeIterator getNodeIterator(Session session, RemoteIterator remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote property iterator.
-     *
-     * @param session current session
-     * @param remote remote property iterator
-     * @return local property iterator adapter
-     */
-    PropertyIterator getPropertyIterator(Session session, RemoteIterator remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote version iterator.
-     *
-     * @param session current session
-     * @param remote remote version iterator
-     * @return local version iterator adapter
-     */
-    VersionIterator getVersionIterator(Session session, RemoteIterator remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote
-     * node type iterator.
-     *
-     * @param remote remote node type iterator
-     * @return local node type iterator adapter
-     */
-    NodeTypeIterator getNodeTypeIterator(RemoteIterator remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote row iterator.
-     *
-     * @param session current session
-     * @param remote remote row iterator
-     * @return local row iterator adapter
-     */
-    RowIterator getRowIterator(Session session, RemoteIterator remote);
-
-    LockManager getLockManager(Session session, RemoteLockManager lockManager);
-
-    VersionManager getVersionManager(
-            Session session, RemoteVersionManager versionManager);
-
-    /**
-     * Factory method for creating a local adapter for a remote access control
-     * manager
-     *
-     * @param remote remote access control manager
-     * @return local access control manager
-     */
-    AccessControlManager getAccessControlManager(
-            RemoteAccessControlManager remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote access control
-     * policy
-     *
-     * @param remote remote access control policy
-     * @return local access control policy
-     */
-    AccessControlPolicy getAccessControlPolicy(RemoteAccessControlPolicy remote);
-
-    /**
-     * Factory method for creating an array of local adapter for an array of
-     * remote access control policies
-     *
-     * @param remote array of remote access control policies
-     * @return array of local access control policies
-     */
-    AccessControlPolicy[] getAccessControlPolicy(
-            RemoteAccessControlPolicy[] remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote access control
-     * policy iterator
-     *
-     * @param remote access control policy iterator
-     * @return local access control policy iterator
-     */
-    AccessControlPolicyIterator getAccessControlPolicyIterator(
-            RemoteIterator remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote access control
-     * entry
-     *
-     * @param remote remote access control entry
-     * @return local access control entry
-     */
-    AccessControlEntry getAccessControlEntry(RemoteAccessControlEntry remote);
-
-    /**
-     * Factory method for creating an array of local adapter for an array of
-     * remote access control entry
-     *
-     * @param remote array of remote access control entry
-     * @return local array of access control entry
-     */
-    AccessControlEntry[] getAccessControlEntry(RemoteAccessControlEntry[] remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote principal.
-     * <p>
-     * If <code>remote</code> is a {@link RemoteGroup} the
-     * principal returned implements the <code>org.apache.jackrabbit.api.security.principal.GroupPrincipal</code>
-     * interface.
-     *
-     * @param remote principal
-     * @return local principal
-     */
-    Principal getPrincipal(RemotePrincipal remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote principal
-     * iterator.
-     * <p>
-     * Each entry in the <code>remote</code> iterator which is a
-     * {@link RemoteGroup} will be
-     * provided as a principal implementing the
-     * <code>org.apache.jackrabbit.api.security.principal.GroupPrincipal</code> interface.
-     *
-     * @param remote remote principal iterator
-     * @return local principal iterator
-     */
-    Iterator<Principal> getPrincipalIterator(RemoteIterator remote);
-
-    /**
-     * Factory method for creating a local adapter for a remote privilege
-     *
-     * @param remote remote privilege
-     * @return local privilege
-     */
-    Privilege getPrivilege(RemotePrivilege remote);
-
-    /**
-     * Factory method for creating an array of local adapter for an array of
-     * remote privilege
-     *
-     * @param remote array of remote privilege
-     * @return array of local privilege
-     */
-    Privilege[] getPrivilege(RemotePrivilege[] remote);
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java
deleted file mode 100644
index ef22fd94c..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRepositoryException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.RepositoryException;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * JCR-RMI remote exception. Used by the JCR-RMI client to wrap RMI errors
- * into RepositoryExceptions to avoid breaking the JCR interfaces.
- * <p>
- * Note that if a RemoteException is received by call with no declared
- * exceptions, then the RemoteException is wrapped into a
- * RemoteRuntimeException.
- */
-@Deprecated(forRemoval = true) public class RemoteRepositoryException extends RepositoryException {
-
-    /**
-     * Creates a RemoteRepositoryException based on the given RemoteException.
-     *
-     * @param ex the remote exception
-     */
-    public RemoteRepositoryException(RemoteException ex) {
-        super(ex);
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java
deleted file mode 100644
index a446e5117..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/RemoteRuntimeException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * JCR-RMI remote runtime exception. Used by the JCR-RMI client to wrap
- * RMI errors into RuntimeExceptions to avoid breaking the JCR interfaces.
- * <p>
- * Note that if a RemoteException is received by call that declares to
- * throw RepositoryExceptions, then the RemoteException is wrapped into
- * a RemoteRepositoryException.
- */
-@Deprecated(forRemoval = true) public class RemoteRuntimeException extends RuntimeException {
-
-    /**
-     * Creates a RemoteRuntimeException based on the given RemoteException.
-     *
-     * @param ex the remote exception
-     */
-    public RemoteRuntimeException(RemoteException ex) {
-        super(ex);
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java
deleted file mode 100644
index c9981ba00..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SafeClientRepository.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.Credentials;
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-
-import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-import org.apache.jackrabbit.rmi.remote.RemoteSession;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A "safe" local adapter for the JCR-RMI
- * {@link org.apache.jackrabbit.rmi.remote.RemoteRepository RemoteRepository}
- * interface. This class uses an abstract factory method for loading
- * (and reloading) the remote repository instance that is made locally
- * available through the JCR {@link Repository} interface. If the remote
- * reference breaks (a RemoteException is thrown by a remote call), then
- * this adapter attempts to reload the remote reference once before failing.
- *
- * @see javax.jcr.Repository
- * @see org.apache.jackrabbit.rmi.remote.RemoteRepository
- */
-@Deprecated(forRemoval = true) public abstract class SafeClientRepository extends ClientObject
-        implements Repository {
-
-    /** The adapted remote repository. */
-    private RemoteRepository remote;
-
-    /**
-     * Creates a client adapter for the given remote repository.
-     *
-     * @param factory local adapter factory
-     */
-    public SafeClientRepository(LocalAdapterFactory factory) {
-        super(factory);
-        try {
-            remote = getRemoteRepository(true);
-        } catch (RemoteException e) {
-            remote = new BrokenRemoteRepository(e);
-        }
-    }
-
-    /**
-     * Abstract factory class for getting the remote repository.
-     *
-     * @return remote repository
-     * @throws RemoteException if the remote repository could not be accessed
-     */
-    protected abstract RemoteRepository getRemoteRepository()
-            throws RemoteException;
-
-    /**
-     * Method to obtain the remote remote repository.
-     * If initialize is true and a RepositoryException will be thrown no {@link BrokenRemoteRepository}
-     * will be created. 
-     *
-     * @return remote repository
-     * @throws RemoteException if the remote repository could not be accessed
-     */
-    protected RemoteRepository getRemoteRepository(boolean initialize)
-            throws RemoteException {
-        if (initialize) {
-            try {
-                return getRemoteRepository();
-            } catch (RemoteException e) {
-                throw new RemoteRuntimeException(e);
-            }
-        } else {
-            return getRemoteRepository();
-        }
-    }
-
-    /** {@inheritDoc} */
-    public synchronized String getDescriptor(String name) {
-        try {
-            return remote.getDescriptor(name);
-        } catch (RemoteException e1) {
-            try {
-                remote = getRemoteRepository(false);
-                return remote.getDescriptor(name);
-            } catch (RemoteException e2) {
-                remote = new BrokenRemoteRepository(e2);
-                throw new RemoteRuntimeException(e2);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public synchronized String[] getDescriptorKeys() {
-        try {
-            return remote.getDescriptorKeys();
-        } catch (RemoteException e1) {
-            try {
-                remote = getRemoteRepository(false);
-                return remote.getDescriptorKeys();
-            } catch (RemoteException e2) {
-                remote = new BrokenRemoteRepository(e2);
-                throw new RemoteRuntimeException(e2);
-            }
-        }
-    }
-
-    private synchronized RemoteSession remoteLogin(
-            Credentials credentials, String workspace)
-            throws RepositoryException {
-        try {
-            return remote.login(credentials, workspace);
-        } catch (RemoteException e1) {
-            try {
-                remote = getRemoteRepository(false);
-                return remote.login(credentials, workspace);
-            } catch (RemoteException e2) {
-                remote = new BrokenRemoteRepository(e2);
-                throw new RemoteRepositoryException(e2);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Session login(Credentials credentials, String workspace)
-            throws RepositoryException {
-        RemoteSession session = remoteLogin(credentials, workspace);
-        return getFactory().getSession(this, session);
-    }
-
-    /** {@inheritDoc} */
-    public Session login(String workspace) throws RepositoryException {
-        return login(null, workspace);
-    }
-
-    /** {@inheritDoc} */
-    public Session login(Credentials credentials) throws RepositoryException {
-        return login(credentials, null);
-    }
-
-    /** {@inheritDoc} */
-    public Session login() throws RepositoryException {
-        return login(null, null);
-    }
-
-    /** {@inheritDoc} */
-    public synchronized Value getDescriptorValue(String key) {
-        try {
-            return remote.getDescriptorValue(key);
-        } catch (RemoteException e1) {
-            try {
-                remote = getRemoteRepository(false);
-                return remote.getDescriptorValue(key);
-            } catch (RemoteException e2) {
-                remote = new BrokenRemoteRepository(e2);
-                throw new RemoteRuntimeException(e2);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public synchronized Value[] getDescriptorValues(String key) {
-        try {
-            return remote.getDescriptorValues(key);
-        } catch (RemoteException e1) {
-            try {
-                remote = getRemoteRepository(false);
-                return remote.getDescriptorValues(key);
-            } catch (RemoteException e2) {
-                remote = new BrokenRemoteRepository(e2);
-                throw new RemoteRuntimeException(e2);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public synchronized boolean isSingleValueDescriptor(String key) {
-        try {
-            return remote.isSingleValueDescriptor(key);
-        } catch (RemoteException e1) {
-            try {
-                remote = getRemoteRepository(false);
-                return remote.isSingleValueDescriptor(key);
-            } catch (RemoteException e2) {
-                remote = new BrokenRemoteRepository(e2);
-                throw new RemoteRuntimeException(e2);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public synchronized boolean isStandardDescriptor(String key) {
-        try {
-            return remote.isStandardDescriptor(key);
-        } catch (RemoteException e1) {
-            try {
-                remote = getRemoteRepository(false);
-                return remote.isStandardDescriptor(key);
-            } catch (RemoteException e2) {
-                remote = new BrokenRemoteRepository(e2);
-                throw new RemoteRuntimeException(e2);
-            }
-        }
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java
deleted file mode 100644
index a50bcdafe..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/SerializingContentHandler.java
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client;
-
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Result;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXTransformerFactory;
-import javax.xml.transform.sax.TransformerHandler;
-import javax.xml.transform.stream.StreamResult;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A {@link ContentHandler} that serializes SAX events to a given
- * {@link Result} instance. The JAXP {@link SAXTransformerFactory}
- * facility is used for the serialization.
- * <p>
- * This class explicitly ensures that all namespace prefixes are also
- * present as xmlns attributes in the serialized XML document. This avoids
- * problems with Xalan's serialization behaviour which was (at least during
- * JDK 1.4) to ignore namespaces if they were not present as xmlns attributes.
- * <p>
- * NOTE: The code in this class was originally written for Apache Cocoon and
- * is included with some modifications here in Apache Jackrabbit. See the
- * org.apache.cocoon.serialization.AbstractTextSerializer class in the
- * cocoon-pipeline-impl component for the original code.
- */
-@Deprecated(forRemoval = true) class SerializingContentHandler extends DefaultContentHandler {
-
-    /**
-     * The character encoding used for serialization (UTF-8).
-     * The encoding is fixed to make the text/xml content type safer to use.
-     *
-     * @see https://issues.apache.org/jira/browse/JCR-1621
-     */
-    public static final String ENCODING = "UTF-8";
-
-    /** The URI for xml namespaces */
-    private static final String XML = "http://www.w3.org/XML/1998/namespace";
-
-    /**
-     * The factory used to create serializing SAX transformers.
-     */
-    private static final SAXTransformerFactory FACTORY =
-        // Note that the cast from below is strictly speaking only valid when
-        // the factory instance supports the SAXTransformerFactory.FEATURE
-        // feature. But since this class would be useless without this feature,
-        // it's no problem to fail with a ClassCastException here and prevent
-        // this class from even being loaded. AFAIK all common JAXP
-        // implementations do support this feature.
-        (SAXTransformerFactory) TransformerFactory.newInstance();
-
-    /**
-     * Flag that indicates whether we need to work around the issue of
-     * the serializer not automatically generating the required xmlns
-     * attributes for the namespaces used in the document.
-     */
-    private static final boolean NEEDS_XMLNS_ATTRIBUTES =
-        needsXmlnsAttributes();
-
-    /**
-     * Probes the available XML serializer for xmlns support. Used to set
-     * the value of the {@link #NEEDS_XMLNS_ATTRIBUTES} flag.
-     *
-     * @return whether the XML serializer needs explicit xmlns attributes
-     */
-    private static boolean needsXmlnsAttributes() {
-        try {
-            StringWriter writer = new StringWriter();
-            TransformerHandler probe = FACTORY.newTransformerHandler();
-            probe.setResult(new StreamResult(writer));
-            probe.startDocument();
-            probe.startPrefixMapping("p", "uri");
-            probe.startElement("uri", "e", "p:e", new AttributesImpl());
-            probe.endElement("uri", "e", "p:e");
-            probe.endPrefixMapping("p");
-            probe.endDocument();
-            return writer.toString().indexOf("xmlns") == -1;
-        } catch (Exception e) {
-            throw new UnsupportedOperationException("XML serialization fails");
-        }
-    }
-
-    /**
-     * Creates a serializing content handler that writes to the given stream.
-     *
-     * @param stream serialization target
-     * @return serializing content handler
-     * @throws SAXException if the content handler could not be initialized
-     */
-    public static DefaultHandler getSerializer(OutputStream output)
-            throws SAXException {
-        return getSerializer(new StreamResult(output));
-    }
-
-    /**
-     * Creates a serializing content handler that writes to the given writer.
-     *
-     * @param writer serialization target
-     * @return serializing content handler
-     * @throws SAXException if the content handler could not be initialized
-     */
-    public static DefaultHandler getSerializer(Writer writer)
-            throws SAXException {
-        return getSerializer(new StreamResult(writer));
-    }
-
-    /**
-     * Creates a serializing content handler that writes to the given result.
-     *
-     * @param result serialization target
-     * @return serializing content handler
-     * @throws SAXException if the content handler could not be initialized
-     */
-    public static DefaultHandler getSerializer(Result result)
-            throws SAXException {
-        try {
-            TransformerHandler handler = FACTORY.newTransformerHandler();
-            handler.setResult(result);
-
-            // Specify the output properties to avoid surprises especially in
-            // character encoding or the output method (might be html for some
-            // documents!)
-            Transformer transformer = handler.getTransformer();
-            transformer.setOutputProperty(OutputKeys.METHOD, "xml");
-            transformer.setOutputProperty(OutputKeys.ENCODING, ENCODING);
-            transformer.setOutputProperty(OutputKeys.INDENT, "no");
-
-            if (NEEDS_XMLNS_ATTRIBUTES) {
-                // The serializer does not output xmlns declarations,
-                // so we need to do it explicitly with this wrapper
-                return new SerializingContentHandler(handler);
-            } else {
-                return new DefaultContentHandler(handler);
-            }
-        } catch (TransformerConfigurationException e) {
-            throw new SAXException("Failed to initialize XML serializer", e);
-        }
-    }
-
-    /**
-     * The prefixes of startPrefixMapping() declarations for the coming element.
-     */
-    private List prefixList = new ArrayList();
-
-    /**
-     * The URIs of startPrefixMapping() declarations for the coming element.
-     */
-    private List uriList = new ArrayList();
-
-    /**
-     * Maps of URI<->prefix mappings. Used to work around a bug in the Xalan
-     * serializer.
-     */
-    private Map uriToPrefixMap = new HashMap();
-    private Map prefixToUriMap = new HashMap();
-
-    /**
-     * True if there has been some startPrefixMapping() for the coming element.
-     */
-    private boolean hasMappings = false;
-
-    /**
-     * Stack of the prefixes of explicitly generated prefix mapping calls
-     * per each element level. An entry is appended at the beginning of each
-     * {@link #startElement(String, String, String, Attributes)} call and
-     * removed at the end of each {@link #endElement(String, String, String)}
-     * call. By default the entry for each element is <code>null</code> to
-     * avoid losing performance, but whenever the code detects a new prefix
-     * mapping that needs to be registered, the <code>null</code> entry is
-     * replaced with a list of explicitly registered prefixes for that node.
-     * When that element is closed, the listed prefixes get unmapped.
-     *
-     * @see #checkPrefixMapping(String, String)
-     * @see <a href="https://issues.apache.org/jira/browse/JCR-1767">JCR-1767</a>
-     */
-    private final List addedPrefixMappings = new ArrayList();
-
-    private SerializingContentHandler(ContentHandler handler) {
-        super(handler);
-    }
-
-    public void startDocument() throws SAXException {
-        // Cleanup
-        this.uriToPrefixMap.clear();
-        this.prefixToUriMap.clear();
-        clearMappings();
-        super.startDocument();
-    }
-
-    /**
-     * Track mappings to be able to add <code>xmlns:</code> attributes
-     * in <code>startElement()</code>.
-     */
-    public void startPrefixMapping(String prefix, String uri) throws SAXException {
-        // Store the mappings to reconstitute xmlns:attributes
-        // except prefixes starting with "xml": these are reserved
-        // VG: (uri != null) fixes NPE in startElement
-        if (uri != null && !prefix.startsWith("xml")) {
-            this.hasMappings = true;
-            this.prefixList.add(prefix);
-            this.uriList.add(uri);
-
-            // append the prefix colon now, in order to save concatenations later, but
-            // only for non-empty prefixes.
-            if (prefix.length() > 0) {
-                this.uriToPrefixMap.put(uri, prefix + ":");
-            } else {
-                this.uriToPrefixMap.put(uri, prefix);
-            }
-
-            this.prefixToUriMap.put(prefix, uri);
-        }
-        super.startPrefixMapping(prefix, uri);
-    }
-
-    /**
-     * Checks whether a prefix mapping already exists for the given namespace
-     * and generates the required {@link #startPrefixMapping(String, String)}
-     * call if the mapping is not found. By default the registered prefix
-     * is taken from the given qualified name, but a different prefix is
-     * automatically selected if that prefix is already used.
-     *
-     * @see <a href="https://issues.apache.org/jira/browse/JCR-1767">JCR-1767</a>
-     * @param uri namespace URI
-     * @param qname element name with the prefix, or <code>null</code>
-     * @throws SAXException if the prefix mapping can not be added
-     */
-    private void checkPrefixMapping(String uri, String qname)
-            throws SAXException {
-        // Only add the prefix mapping if the URI is not already known
-        if (uri != null && uri.length() > 0 && !uri.startsWith("xml")
-                && !uriToPrefixMap.containsKey(uri)) {
-            // Get the prefix
-            String prefix = "ns";
-            if (qname != null && qname.length() > 0) {
-                int colon = qname.indexOf(':');
-                if (colon != -1) {
-                    prefix = qname.substring(0, colon);
-                }
-            }
-
-            // Make sure that the prefix is unique
-            String base = prefix;
-            for (int i = 2; prefixToUriMap.containsKey(prefix); i++) {
-                prefix = base + i;
-            }
-
-            int last = addedPrefixMappings.size() - 1;
-            List prefixes = (List) addedPrefixMappings.get(last);
-            if (prefixes == null) {
-                prefixes = new ArrayList();
-                addedPrefixMappings.set(last, prefixes);
-            }
-            prefixes.add(prefix);
-
-            startPrefixMapping(prefix, uri);
-        }
-    }
-
-    /**
-     * Ensure all namespace declarations are present as <code>xmlns:</code> attributes
-     * and add those needed before calling superclass. This is a workaround for a Xalan bug
-     * (at least in version 2.0.1) : <code>org.apache.xalan.serialize.SerializerToXML</code>
-     * ignores <code>start/endPrefixMapping()</code>.
-     */
-    public void startElement(
-            String eltUri, String eltLocalName, String eltQName, Attributes attrs)
-            throws SAXException {
-        // JCR-1767: Generate extra prefix mapping calls where needed
-        addedPrefixMappings.add(null);
-        checkPrefixMapping(eltUri, eltQName);
-        for (int i = 0; i < attrs.getLength(); i++) {
-            checkPrefixMapping(attrs.getURI(i), attrs.getQName(i));
-        }
-
-        // try to restore the qName. The map already contains the colon
-        if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) {
-            eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName;
-        }
-        if (this.hasMappings) {
-            // Add xmlns* attributes where needed
-
-            // New Attributes if we have to add some.
-            AttributesImpl newAttrs = null;
-
-            int mappingCount = this.prefixList.size();
-            int attrCount = attrs.getLength();
-
-            for (int mapping = 0; mapping < mappingCount; mapping++) {
-
-                // Build infos for this namespace
-                String uri = (String) this.uriList.get(mapping);
-                String prefix = (String) this.prefixList.get(mapping);
-                String qName = prefix.equals("") ? "xmlns" : ("xmlns:" + prefix);
-
-                // Search for the corresponding xmlns* attribute
-                boolean found = false;
-                for (int attr = 0; attr < attrCount; attr++) {
-                    if (qName.equals(attrs.getQName(attr))) {
-                        // Check if mapping and attribute URI match
-                        if (!uri.equals(attrs.getValue(attr))) {
-                            throw new SAXException("URI in prefix mapping and attribute do not match");
-                        }
-                        found = true;
-                        break;
-                    }
-                }
-
-                if (!found) {
-                    // Need to add this namespace
-                    if (newAttrs == null) {
-                        // Need to test if attrs is empty or we go into an infinite loop...
-                        // Well know SAX bug which I spent 3 hours to remind of :-(
-                        if (attrCount == 0) {
-                            newAttrs = new AttributesImpl();
-                        } else {
-                            newAttrs = new AttributesImpl(attrs);
-                        }
-                    }
-
-                    if (prefix.equals("")) {
-                        newAttrs.addAttribute(XML, qName, qName, "CDATA", uri);
-                    } else {
-                        newAttrs.addAttribute(XML, prefix, qName, "CDATA", uri);
-                    }
-                }
-            } // end for mapping
-
-            // Cleanup for the next element
-            clearMappings();
-
-            // Start element with new attributes, if any
-            super.startElement(eltUri, eltLocalName, eltQName, newAttrs == null ? attrs : newAttrs);
-        } else {
-            // Normal job
-            super.startElement(eltUri, eltLocalName, eltQName, attrs);
-        }
-    }
-
-
-    /**
-     * Receive notification of the end of an element.
-     * Try to restore the element qName.
-     */
-    public void endElement(String eltUri, String eltLocalName, String eltQName) throws SAXException {
-        // try to restore the qName. The map already contains the colon
-        if (null != eltUri && eltUri.length() != 0 && this.uriToPrefixMap.containsKey(eltUri)) {
-            eltQName = this.uriToPrefixMap.get(eltUri) + eltLocalName;
-        }
-
-        super.endElement(eltUri, eltLocalName, eltQName);
-
-        // JCR-1767: Generate extra prefix un-mapping calls where needed
-        int last = addedPrefixMappings.size() - 1;
-        List prefixes = (List) addedPrefixMappings.remove(last);
-        if (prefixes != null) {
-            Iterator iterator = prefixes.iterator();
-            while (iterator.hasNext()) {
-                endPrefixMapping((String) iterator.next());
-            }
-        }
-    }
-
-    /**
-     * End the scope of a prefix-URI mapping:
-     * remove entry from mapping tables.
-     */
-    public void endPrefixMapping(String prefix) throws SAXException {
-        // remove mappings for xalan-bug-workaround.
-        // Unfortunately, we're not passed the uri, but the prefix here,
-        // so we need to maintain maps in both directions.
-        if (this.prefixToUriMap.containsKey(prefix)) {
-            this.uriToPrefixMap.remove(this.prefixToUriMap.get(prefix));
-            this.prefixToUriMap.remove(prefix);
-        }
-
-        if (hasMappings) {
-            // most of the time, start/endPrefixMapping calls have an element event between them,
-            // which will clear the hasMapping flag and so this code will only be executed in the
-            // rather rare occasion when there are start/endPrefixMapping calls with no element
-            // event in between. If we wouldn't remove the items from the prefixList and uriList here,
-            // the namespace would be incorrectly declared on the next element following the
-            // endPrefixMapping call.
-            int pos = prefixList.lastIndexOf(prefix);
-            if (pos != -1) {
-                prefixList.remove(pos);
-                uriList.remove(pos);
-            }
-        }
-
-        super.endPrefixMapping(prefix);
-    }
-
-    public void endDocument() throws SAXException {
-        // Cleanup
-        this.uriToPrefixMap.clear();
-        this.prefixToUriMap.clear();
-        clearMappings();
-        super.endDocument();
-    }
-
-    private void clearMappings() {
-        this.hasMappings = false;
-        this.prefixList.clear();
-        this.uriList.clear();
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java
deleted file mode 100644
index dfc4123c1..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientIterator.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client.iterator;
-
-import java.rmi.RemoteException;
-import java.util.NoSuchElementException;
-
-import javax.jcr.RangeIterator;
-
-import org.apache.jackrabbit.rmi.client.ClientObject;
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A buffering local adapter for the JCR-RMI {@link RemoteIterator}
- * interface. This class makes the remote iterator locally available
- * using the JCR {@link RangeIterator} interface. The element arrays
- * returned by the remote iterator are buffered locally.
- * <p>
- * See the subclasses for type-specific versions of this abstract class.
- */
-@Deprecated(forRemoval = true) public abstract class ClientIterator extends ClientObject
-        implements RangeIterator {
-
-    /** The adapted remote iterator. */
-    private final RemoteIterator remote;
-
-    /**
-     * The cached number of elements in the iterator, -1 if the iterator
-     * size is unknown, or -2 if the size has not been retrieved from the
-     * remote iterator.
-     */
-    private long size;
-
-    /** The position of the buffer within the iteration. */
-    private long positionOfBuffer;
-
-    /** The position within the buffer of the iteration. */
-    private int positionInBuffer;
-
-    /**
-     * The element buffer. Set to <code>null</code> when the end of the
-     * iteration has been reached.
-     */
-    private Object[] buffer;
-
-    /**
-     * Creates a local adapter for the given remote iterator. The element
-     * buffer is initially empty.
-     *
-     * @param remote        remote iterator
-     * @param factory       local adapter factory
-     */
-    public ClientIterator(RemoteIterator remote, LocalAdapterFactory factory) {
-        super(factory);
-        this.remote = remote;
-        this.size = -2;
-        this.positionOfBuffer = 0;
-        this.positionInBuffer = 0;
-        this.buffer = new Object[0];
-    }
-
-    /**
-     * Returns the current position within the iterator.
-     *
-     * @return current position
-     * @see RangeIterator#getPosition()
-     */
-    public long getPosition() {
-        return positionOfBuffer + positionInBuffer;
-    }
-
-    /**
-     * Returns the size (the total number of elements) of this iteration.
-     * Returns <code>-1</code> if the size is unknown.
-     * <p>
-     * To minimize the number of remote method calls, the size is retrieved
-     * when this method is first called and cached for subsequent invocations.
-     *
-     * @return number of elements in the iteration, or <code>-1</code>
-     * @throws RemoteRuntimeException on RMI errors
-     * @see RangeIterator#getSize()
-     */
-    public long getSize() throws RemoteRuntimeException {
-        if (size == -2) {
-            try {
-                size = remote.getSize();
-            } catch (RemoteException e) {
-                throw new RemoteRuntimeException(e);
-            }
-        }
-        return size;
-    }
-
-    /**
-     * Skips the given number of elements in this iteration.
-     * <p>
-     * The elements in the local element buffer are skipped first, and
-     * a remote skip method call is made only if more elements are being
-     * skipped than remain in the local buffer.
-     *
-     * @param skipNum the number of elements to skip
-     * @throws NoSuchElementException if skipped past the last element
-     * @throws RemoteRuntimeException on RMI errors
-     * @see RangeIterator#skip(long)
-     */
-    public void skip(long skipNum)
-            throws NoSuchElementException, RemoteRuntimeException {
-        if (skipNum < 0) {
-            throw new IllegalArgumentException("Negative skip is not allowed");
-        } else if (buffer == null && skipNum > 0) {
-            throw new NoSuchElementException("Skipped past the last element");
-        } else if (positionInBuffer + skipNum <= buffer.length) {
-            positionInBuffer += skipNum;
-        } else {
-            try {
-                skipNum -= buffer.length - positionInBuffer;
-                remote.skip(skipNum);
-                positionInBuffer = buffer.length;
-                positionOfBuffer += skipNum;
-            } catch (RemoteException e) {
-                throw new RemoteRuntimeException(e);
-            } catch (NoSuchElementException e) {
-                buffer = null; // End of iterator reached
-                throw e;
-            }
-        }
-    }
-
-    /**
-     * Advances the element buffer if there are no more elements in it. The
-     * element buffer is set to <code>null</code> if the end of the iteration
-     * has been reached.
-     *
-     * @throws RemoteException on RMI errors
-     */
-    private void advance() throws RemoteException {
-        if (buffer != null && positionInBuffer == buffer.length) {
-            positionOfBuffer += buffer.length;
-            positionInBuffer = 0;
-            buffer = remote.nextObjects();
-            if (buffer == null) {
-                size = positionOfBuffer;
-            }
-        }
-    }
-
-    /**
-     * Checks if there are more elements in this iteration.
-     *
-     * @return <code>true</code> if there are more elements,
-     *         <code>false</code> otherwise
-     * @throws RemoteRuntimeException on RMI errors
-     */
-    public boolean hasNext() throws RemoteRuntimeException {
-        try {
-            advance();
-            return buffer != null;
-        } catch (RemoteException e) {
-            throw new RemoteRuntimeException(e);
-        }
-    }
-
-    /**
-     * Returns a local adapter for the given remote object. This abstract
-     * method is used by {@link #next()} to convert the remote references
-     * returned by the remote iterator to local adapters.
-     * <p>
-     * Subclasses should implement this method to use the local adapter
-     * factory to create local adapters of the specific element type.
-     *
-     * @param remote remote object
-     * @return local adapter
-     */
-    protected abstract Object getObject(Object remote);
-
-    /**
-     * Returns the next element in this iteration.
-     *
-     * @return next element
-     * @throws NoSuchElementException if there are no more elements
-     * @throws RemoteRuntimeException on RMI errors
-     */
-    public Object next() throws NoSuchElementException, RemoteRuntimeException {
-        try {
-            advance();
-            if (buffer == null) {
-                throw new NoSuchElementException("End of iterator reached");
-            } else {
-                return getObject(buffer[positionInBuffer++]);
-            }
-        } catch (RemoteException e) {
-            throw new RemoteRuntimeException(e);
-        }
-    }
-
-    /**
-     * Not supported.
-     *
-     * @throws UnsupportedOperationException always thrown
-     */
-    public void remove() throws UnsupportedOperationException {
-        throw new UnsupportedOperationException();
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java
deleted file mode 100644
index 71c7e1214..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeIterator.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client.iterator;
-
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Session;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteNode;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A ClientIterator for iterating remote nodes.
- */
-@Deprecated(forRemoval = true) public class ClientNodeIterator extends ClientIterator implements NodeIterator {
-
-    /** The current session. */
-    private final Session session;
-
-    /**
-     * Creates a ClientNodeIterator instance.
-     *
-     * @param iterator      remote iterator
-     * @param session       current session
-     * @param factory       local adapter factory
-     */
-    public ClientNodeIterator(
-            RemoteIterator iterator, Session session,
-            LocalAdapterFactory factory) {
-        super(iterator, factory);
-        this.session = session;
-    }
-
-    /**
-     * Creates and returns a local adapter for the given remote node.
-     *
-     * @param remote remote referecne
-     * @return local adapter
-     * @see ClientIterator#getObject(Object)
-     */
-    protected Object getObject(Object remote) {
-        return getNode(session, (RemoteNode) remote);
-    }
-
-    /**
-     * Returns the next node in this iteration.
-     *
-     * @return next node
-     * @see NodeIterator#nextNode()
-     */
-    public Node nextNode() {
-        return (Node) next();
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java
deleted file mode 100644
index 8bf80cbf3..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientNodeTypeIterator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client.iterator;
-
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.nodetype.NodeTypeIterator;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A ClientIterator for iterating remote node types.
- */
-@Deprecated(forRemoval = true) public class ClientNodeTypeIterator extends ClientIterator
-        implements NodeTypeIterator {
-
-    /**
-     * Creates a ClientNodeTypeIterator instance.
-     *
-     * @param iterator      remote iterator
-     * @param factory       local adapter factory
-     */
-    public ClientNodeTypeIterator(
-            RemoteIterator iterator, LocalAdapterFactory factory) {
-        super(iterator, factory);
-    }
-
-    /**
-     * Creates and returns a local adapter for the given remote node.
-     *
-     * @param remote remote referecne
-     * @return local adapter
-     * @see ClientIterator#getObject(Object)
-     */
-    protected Object getObject(Object remote) {
-        return getFactory().getNodeType((RemoteNodeType) remote);
-    }
-
-    /**
-     * Returns the next node type in this iteration.
-     *
-     * @return next node type
-     * @see NodeTypeIterator#nextNodeType()
-     */
-    public NodeType nextNodeType() {
-        return (NodeType) next();
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java
deleted file mode 100644
index 47e7a35ff..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientPropertyIterator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client.iterator;
-
-import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
-import javax.jcr.Session;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteProperty;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A ClientIterator for iterating remote properties.
- */
-@Deprecated(forRemoval = true) public class ClientPropertyIterator extends ClientIterator
-        implements PropertyIterator {
-
-    /** The current session. */
-    private final Session session;
-
-    /**
-     * Creates a ClientPropertyIterator instance.
-     *
-     * @param iterator      remote iterator
-     * @param session       current session
-     * @param factory       local adapter factory
-     */
-    public ClientPropertyIterator(
-            RemoteIterator iterator, Session session,
-            LocalAdapterFactory factory) {
-        super(iterator, factory);
-        this.session = session;
-    }
-
-    /**
-     * Creates and returns a local adapter for the given remote property.
-     *
-     * @param remote remote referecne
-     * @return local adapter
-     * @see ClientIterator#getObject(Object)
-     */
-    protected Object getObject(Object remote) {
-        return getFactory().getProperty(session, (RemoteProperty) remote);
-    }
-
-    /**
-     * Returns the next property in this iteration.
-     *
-     * @return next property
-     * @see PropertyIterator#nextProperty()
-     */
-    public Property nextProperty() {
-        return (Property) next();
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java
deleted file mode 100644
index 6774b10ce..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientRowIterator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client.iterator;
-
-import javax.jcr.Session;
-import javax.jcr.query.Row;
-import javax.jcr.query.RowIterator;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteRow;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A ClientIterator for iterating remote rows.
- */
-@Deprecated(forRemoval = true) public class ClientRowIterator extends ClientIterator implements RowIterator {
-
-    /** Current session. */
-    private Session session;
-
-    /**
-     * Creates a ClientRowIterator instance.
-     *
-     * @param iterator      remote iterator
-     * @param factory       local adapter factory
-     */
-    public ClientRowIterator(Session session,
-            RemoteIterator iterator, LocalAdapterFactory factory) {
-        super(iterator, factory);
-        this.session = session;
-    }
-
-    /**
-     * Creates and returns a local adapter for the given remote row.
-     *
-     * @param remote remote reference
-     * @return local adapter
-     * @see ClientIterator#getObject(Object)
-     */
-    protected Object getObject(Object remote) {
-        return getFactory().getRow(session, (RemoteRow) remote);
-    }
-
-    /**
-     * Returns the next row in this iteration.
-     *
-     * @return next row
-     * @see RowIterator#nextRow()
-     */
-    public Row nextRow() {
-        return (Row) next();
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java
deleted file mode 100644
index 4d1cd98cc..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/ClientVersionIterator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client.iterator;
-
-import javax.jcr.Session;
-import javax.jcr.version.Version;
-import javax.jcr.version.VersionIterator;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteVersion;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A ClientIterator for iterating remote versions.
- */
-@Deprecated(forRemoval = true) public class ClientVersionIterator extends ClientIterator
-        implements VersionIterator {
-
-    /** The current session. */
-    private final Session session;
-
-    /**
-     * Creates a ClientVersionIterator instance.
-     *
-     * @param iterator      remote iterator
-     * @param session       current session
-     * @param factory       local adapter factory
-     */
-    public ClientVersionIterator(
-            RemoteIterator iterator, Session session,
-            LocalAdapterFactory factory) {
-        super(iterator, factory);
-        this.session = session;
-    }
-
-    /**
-     * Creates and returns a local adapter for the given remote version.
-     *
-     * @param remote remote referecne
-     * @return local adapter
-     * @see ClientIterator#getObject(Object)
-     */
-    protected Object getObject(Object remote) {
-        return getFactory().getVersion(session, (RemoteVersion) remote);
-    }
-
-    /**
-     * Returns the next version in this iteration.
-     *
-     * @return next version
-     * @see VersionIterator#nextVersion()
-     */
-    public Version nextVersion() {
-        return (Version) next();
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java
deleted file mode 100755
index ad196f8e5..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/iterator/package-info.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-@org.osgi.annotation.versioning.Version("3.1.0")
-package org.apache.jackrabbit.rmi.client.iterator;
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java
deleted file mode 100755
index 75e643f92..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/package-info.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-@org.osgi.annotation.versioning.Version("3.1.0")
-package org.apache.jackrabbit.rmi.client;
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
deleted file mode 100644
index 8953b1acb..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientGroup.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.jackrabbit.rmi.client.principal;
-
-import java.rmi.RemoteException;
-import java.security.Principal;
-import java.util.Enumeration;
-import java.util.Iterator;
-
-import org.apache.jackrabbit.api.security.principal.GroupPrincipal;
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.principal.RemoteGroup;
-import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteGroup RemoteGroup} interface.
- *
- * @see RemoteGroup
- */
-@Deprecated(forRemoval = true) public class ClientGroup extends ClientPrincipal implements GroupPrincipal {
-
-    private final LocalAdapterFactory factory;
-
-    public ClientGroup(final RemotePrincipal p,
-            final LocalAdapterFactory factory) {
-        super(p);
-        this.factory = factory;
-    }
-
-    /**
-     * @return false - this method is not implemented yet
-     */
-    public boolean addMember(Principal user) {
-        // no support for adding member here
-        return false;
-    }
-
-    public boolean isMember(Principal member) {
-        try {
-            return ((RemoteGroup) getRemotePrincipal()).isMember(member.getName());
-        } catch (RemoteException re) {
-            throw new RemoteRuntimeException(re);
-        }
-    }
-
-    public Enumeration<? extends Principal> members() {
-        try {
-            final RemoteIterator remote = ((RemoteGroup) getRemotePrincipal()).members();
-            final Iterator<Principal> pi = factory.getPrincipalIterator(remote);
-            return new Enumeration<Principal>() {
-                public boolean hasMoreElements() {
-                    return pi.hasNext();
-                }
-
-                public Principal nextElement() {
-                    return pi.next();
-                }
-            };
-        } catch (RemoteException re) {
-            throw new RemoteRuntimeException(re);
-        }
-    }
-
-    /**
-     * @return false - this method is not implemented yet
-     */
-    public boolean removeMember(Principal user) {
-        // no support for removing member here
-        return false;
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java
deleted file mode 100644
index 24420e518..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipal.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.jackrabbit.rmi.client.principal;
-
-import java.rmi.RemoteException;
-import java.security.Principal;
-
-import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
-import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemotePrincipal RemotePrincipal}
- * interface. This class makes a remote principal locally available using the
- * Java {@link Principal} interface.
- *
- * @see Principal
- * @see RemotePrincipal
- */
-@Deprecated(forRemoval = true) public class ClientPrincipal implements Principal {
-
-    private final RemotePrincipal p;
-
-    public ClientPrincipal(final RemotePrincipal p) {
-        this.p = p;
-    }
-
-    /** {@inheritDoc} */
-    public String getName() {
-        try {
-            return p.getName();
-        } catch (RemoteException re) {
-            throw new RemoteRuntimeException(re);
-        }
-    }
-
-    /**
-     * Returns the {@link RemotePrincipal} encapsulated in this instance.
-     * <p>
-     * NOTE: This method is intended to only be used in the JCR RMI
-     * implementation to be able to "send back" remote principals to the server
-     * for implementation of the remote JCR API.
-     *
-     * @return the {@link RemotePrincipal} encapsulated in this instance.
-     */
-    public final RemotePrincipal getRemotePrincipal() {
-        return p;
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java
deleted file mode 100644
index 31f893b9e..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/ClientPrincipalIterator.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.jackrabbit.rmi.client.principal;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.client.iterator.ClientIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.principal.RemotePrincipal;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A ClientIterator for iterating remote principals
- */
-@Deprecated(forRemoval = true) public class ClientPrincipalIterator extends ClientIterator {
-
-    public ClientPrincipalIterator(final RemoteIterator iterator,
-            final LocalAdapterFactory factory) {
-        super(iterator, factory);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected Object getObject(Object remote) {
-        return getFactory().getPrincipal((RemotePrincipal) remote);
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java
deleted file mode 100755
index 8dd28b896..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/principal/package-info.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-@org.osgi.annotation.versioning.Version("4.0.0")
-package org.apache.jackrabbit.rmi.client.principal;
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java
deleted file mode 100644
index 1e1b3251c..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlEntry.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.jackrabbit.rmi.client.security;
-
-import java.rmi.RemoteException;
-import java.security.Principal;
-
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.Privilege;
-
-import org.apache.jackrabbit.rmi.client.ClientObject;
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.client.RemoteRuntimeException;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteAccessControlEntry
- * RemoteAccessControlEntry} interface. This class makes a remote
- * AccessControlEntry locally available using the JCR {@link AccessControlEntry
- * AccessControlEntry} interface.
- *
- * @see javax.jcr.security.AccessControlEntry
- * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlEntry
- */
-@Deprecated(forRemoval = true) public class ClientAccessControlEntry extends ClientObject implements
-        AccessControlEntry {
-
-    private final RemoteAccessControlEntry race;
-
-    public ClientAccessControlEntry(final RemoteAccessControlEntry race,
-            final LocalAdapterFactory factory) {
-        super(factory);
-        this.race = race;
-    }
-
-    /** {@inheritDoc} */
-    public Principal getPrincipal() {
-        try {
-            return getFactory().getPrincipal(race.getPrincipal());
-        } catch (RemoteException re) {
-            throw new RemoteRuntimeException(re);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Privilege[] getPrivileges() {
-        try {
-            return getFactory().getPrivilege(race.getPrivileges());
-        } catch (RemoteException re) {
-            throw new RemoteRuntimeException(re);
-        }
-    }
-
-    RemoteAccessControlEntry getRemoteAccessControlEntry() {
-        return race;
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java
deleted file mode 100644
index c497d95ba..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlList.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.jackrabbit.rmi.client.security;
-
-import java.rmi.RemoteException;
-import java.security.Principal;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.AccessControlList;
-import javax.jcr.security.Privilege;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.client.RemoteRepositoryException;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteAccessControlList
- * RemoteAccessControlList} interface. This class makes a remote
- * AccessControlList locally available using the JCR {@link AccessControlList
- * AccessControlList} interface.
- *
- * @see javax.jcr.security.AccessControlList
- * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList
- */
-@Deprecated(forRemoval = true) public class ClientAccessControlList extends ClientAccessControlPolicy
-        implements AccessControlList {
-
-    public ClientAccessControlList(final RemoteAccessControlList racl,
-            final LocalAdapterFactory factory) {
-        super(racl, factory);
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException This method is not
-     *             implemented yet
-     */
-    public boolean addAccessControlEntry(Principal principal,
-            Privilege[] privileges)
-            throws UnsupportedRepositoryOperationException {
-        // TODO: implement client side of the story
-        throw new UnsupportedRepositoryOperationException(
-            "addAccessControlEntry");
-    }
-
-    /** {@inheritDoc} */
-    public AccessControlEntry[] getAccessControlEntries()
-            throws RepositoryException {
-        try {
-            return getFactory().getAccessControlEntry(
-                ((RemoteAccessControlList) getRemoteAccessControlPolicy()).getAccessControlEntries());
-        } catch (RemoteException re) {
-            throw new RemoteRepositoryException(re);
-        }
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException This method is not
-     *             implemented yet
-     */
-    public void removeAccessControlEntry(AccessControlEntry ace)
-            throws UnsupportedRepositoryOperationException {
-        // TODO: implement client side of the story
-        throw new UnsupportedRepositoryOperationException(
-            "removeAccessControlEntry");
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java
deleted file mode 100644
index d8c4fd96d..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlManager.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.jackrabbit.rmi.client.security;
-
-import java.rmi.RemoteException;
-
-import javax.jcr.AccessDeniedException;
-import javax.jcr.PathNotFoundException;
-import javax.jcr.RepositoryException;
-import javax.jcr.UnsupportedRepositoryOperationException;
-import javax.jcr.security.AccessControlException;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.AccessControlPolicyIterator;
-import javax.jcr.security.Privilege;
-import org.apache.jackrabbit.rmi.client.ClientObject;
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.client.RemoteRepositoryException;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteAccessControlManager
- * RemoteAccessControlManager} interface. This class makes a remote
- * AccessControlManager locally available using the JCR
- * {@link AccessControlManager AccessControlManager} interface.
- *
- * @see javax.jcr.security.AccessControlManager
- * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlManager
- */
-@Deprecated(forRemoval = true) public class ClientAccessControlManager extends ClientObject implements
-        AccessControlManager {
-
-    private final RemoteAccessControlManager racm;
-
-    public ClientAccessControlManager(final RemoteAccessControlManager racm,
-            final LocalAdapterFactory factory) {
-        super(factory);
-        this.racm = racm;
-    }
-
-    /** {@inheritDoc} */
-    public AccessControlPolicyIterator getApplicablePolicies(String absPath)
-            throws RepositoryException {
-        try {
-            return getFactory().getAccessControlPolicyIterator(
-                racm.getApplicablePolicies(absPath));
-        } catch (RemoteException re) {
-            throw new RemoteRepositoryException(re);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public AccessControlPolicy[] getEffectivePolicies(String absPath)
-            throws PathNotFoundException, AccessDeniedException,
-            RepositoryException {
-        try {
-            return getFactory().getAccessControlPolicy(
-                racm.getEffectivePolicies(absPath));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public AccessControlPolicy[] getPolicies(String absPath)
-            throws PathNotFoundException, AccessDeniedException,
-            RepositoryException {
-        try {
-            return getFactory().getAccessControlPolicy(
-                racm.getPolicies(absPath));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Privilege[] getPrivileges(String absPath)
-            throws PathNotFoundException, RepositoryException {
-        try {
-            return getFactory().getPrivilege(racm.getPrivileges(absPath));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public Privilege[] getSupportedPrivileges(String absPath)
-            throws PathNotFoundException, RepositoryException {
-        try {
-            return getFactory().getPrivilege(
-                racm.getSupportedPrivileges(absPath));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean hasPrivileges(String absPath, Privilege[] privileges)
-            throws PathNotFoundException, RepositoryException {
-        String[] privNames = new String[privileges.length];
-        for (int i = 0; i < privNames.length; i++) {
-            privNames[i] = privileges[i].getName();
-        }
-
-        try {
-            return racm.hasPrivileges(absPath, privNames);
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-
-    }
-
-    /** {@inheritDoc} */
-    public Privilege privilegeFromName(String privilegeName)
-            throws AccessControlException, RepositoryException {
-        try {
-            return getFactory().getPrivilege(
-                racm.privilegeFromName(privilegeName));
-        } catch (RemoteException ex) {
-            throw new RemoteRepositoryException(ex);
-        }
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException This method is not
-     *             implemented yet
-     */
-    public void removePolicy(String absPath, AccessControlPolicy policy)
-            throws UnsupportedRepositoryOperationException {
-        // TODO: implement client side of the story
-        throw new UnsupportedRepositoryOperationException("removePolicy");
-    }
-
-    /**
-     * @throws UnsupportedRepositoryOperationException This method is not
-     *             implemented yet
-     */
-    public void setPolicy(String absPath, AccessControlPolicy policy)
-            throws UnsupportedRepositoryOperationException {
-        // TODO: implement client side of the story
-        throw new UnsupportedRepositoryOperationException("setPolicy");
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java
deleted file mode 100644
index 30c12bd3e..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicy.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.jackrabbit.rmi.client.security;
-
-import javax.jcr.security.AccessControlPolicy;
-import org.apache.jackrabbit.rmi.client.ClientObject;
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * Local adapter for the JCR-RMI {@link RemoteAccessControlPolicy
- * RemoteAccessControlPolicy} interface. This class makes a remote
- * AccessControlPolicy locally available using the JCR
- * {@link AccessControlPolicy AccessControlPolicy} interface.
- *
- * @see javax.jcr.security.AccessControlPolicy
- * @see org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlPolicy
- */
-@Deprecated(forRemoval = true) public class ClientAccessControlPolicy extends ClientObject implements
-        AccessControlPolicy {
-
-    private final RemoteAccessControlPolicy racp;
-
-    public ClientAccessControlPolicy(final RemoteAccessControlPolicy racp,
-            final LocalAdapterFactory factory) {
-        super(factory);
-        this.racp = racp;
-    }
-
-    RemoteAccessControlPolicy getRemoteAccessControlPolicy() {
-        return racp;
-    }
-
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java
deleted file mode 100644
index 80ac1bb07..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientAccessControlPolicyIterator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.rmi.client.security;
-
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.AccessControlPolicyIterator;
-
-import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
-import org.apache.jackrabbit.rmi.client.iterator.ClientIterator;
-import org.apache.jackrabbit.rmi.remote.RemoteIterator;
-import org.apache.jackrabbit.rmi.remote.security.RemoteAccessControlList;
-
-/**
- * @deprecated RMI support is deprecated and will be removed in a future version of Jackrabbit; see <a href=https://issues.apache.org/jira/browse/JCR-4972 target=_blank>Jira ticket JCR-4972</a> for more information.
- * <p>
- * A ClientIterator for iterating remote access control policies.
- */
-@Deprecated(forRemoval = true) public class ClientAccessControlPolicyIterator extends ClientIterator implements
-        AccessControlPolicyIterator {
-
-    public ClientAccessControlPolicyIterator(RemoteIterator iterator,
-            LocalAdapterFactory factory) {
-        super(iterator, factory);
-    }
-
-    /** {@inheritDoc} */
-    protected Object getObject(Object remote) {
-        return getFactory().getAccessControlPolicy(
-            (RemoteAccessControlList) remote);
-    }
-
-    /** {@inheritDoc} */
-    public AccessControlPolicy nextAccessControlPolicy() {
-        return (AccessControlPolicy) next();
-    }
-}
diff --git a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java b/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java
deleted file mode 100644
index 0bcfb22b1..000000000
--- a/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/security/ClientPrivilege.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
... 17007 lines suppressed ...