You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2025/01/06 13:22:53 UTC

(sling-org-apache-sling-nosql-mongodb-resourceprovider) branch master updated: mark module as deprecated

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

sseifert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-nosql-mongodb-resourceprovider.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b79894  mark module as deprecated
9b79894 is described below

commit 9b798948f4c9e652f49c3bd50e05c1f19c67aeb8
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Mon Jan 6 14:22:45 2025 +0100

    mark module as deprecated
---
 .asf.yaml                                          |   6 +
 CODE_OF_CONDUCT.md                                 |  22 ---
 CONTRIBUTING.md                                    |  24 ---
 Jenkinsfile                                        |  20 ---
 README.md                                          |  26 +--
 pom.xml                                            | 184 ---------------------
 .../resourceprovider/impl/MongoDBNoSqlAdapter.java | 163 ------------------
 .../impl/MongoDBNoSqlResourceProviderFactory.java  | 113 -------------
 .../integration/IndexCreationIT.java               |  78 ---------
 .../MongoDBNoSqlResourceProviderIT.java            |  69 --------
 .../MongoDBNoSqlResourceProviderRootIT.java        |  42 -----
 ...ongoDBNoSqlResourceProviderTransactionalIT.java |  69 --------
 12 files changed, 9 insertions(+), 807 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index b8d35f3..bfcc386 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -1,4 +1,10 @@
 github:
+  description: "Apache Sling NoSQL MongoDB Resource Provider (deprecated)"
+  homepage: "https://sling.apache.org/"
+  labels:
+  - "sling"
+  - "java"
+  - "deprecated"
   autolink_jira:
   - "SLING"
   - "OAK"
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index 0fa18e5..0000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,22 +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.
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
-Apache Software Foundation Code of Conduct
-====
-
-Being an Apache project, Apache Sling adheres to the Apache Software Foundation's [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index ac82a1a..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,24 +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.
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
-Contributing
-====
-
-Thanks for choosing to contribute!
-
-You will find all the necessary details about how you can do this at https://sling.apache.org/contributing.html.
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index f582519..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,20 +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.
- */
-
-slingOsgiBundleBuild()
diff --git a/README.md b/README.md
index b635e34..9772ada 100644
--- a/README.md
+++ b/README.md
@@ -2,28 +2,8 @@
 
 &#32;[![Build Status](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-nosql-mongodb-resourceprovider/job/master/badge/icon)](https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-nosql-mongodb-resourceprovider/job/master/)&#32;[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=apache_sling-org-apache-sling-nosql-mongodb-resourceprovider&metric=coverage)](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sli [...]
 
-# Apache Sling NoSQL MongoDB Resource Provider
+# Apache Sling NoSQL MongoDB Resource Provider (deprecated)
 
-This module is part of the [Apache Sling](https://sling.apache.org) project.
+This module is **obsolete**.
 
-Sling ResourceProvider implementation that uses [MongoDB](https://www.mongodb.org/) NoSQL database as persistence.
-
-Based on the "Apache Sling NoSQL Generic Resource Provider".
-
-All resource data is stored in one MongoDB database and one collection, using the path of the resource as "_id" property.
-
-
-Configuration on deployment
----------------------------
-
-* Create a factory configuration for "Apache Sling NoSQL MongoDB Resource Provider Factory" to define the root of the resource tree that should be stored in MongoDB, and MongoDB connection string, database name and collection name.
-
-
-Run integration tests
----------------------
-
-To run the integration tests you have to set up a real MongoDB server and run the tests with this command line (inserting the correct parameters):
-
-```
-mvn -Pmongodb-integration-test -DconnectionString=localhost:27017 -Ddatabase=sling -Dcollection=resources integration-test
-```
+For reference or potential bugfix releases use branch [maintenance](https://github.com/apache/sling-org-apache-sling-nosql-mongodb-resourceprovider/tree/maintenance).
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 9e8fe42..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,184 +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/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.sling</groupId>
-        <artifactId>sling</artifactId>
-        <version>26</version>
-        <relativePath />
-    </parent>
-
-    <artifactId>org.apache.sling.nosql.mongodb-resourceprovider</artifactId>
-    <version>1.1.1-SNAPSHOT</version>
-    <packaging>bundle</packaging>
-  
-    <name>Apache Sling NoSQL MongoDB Resource Provider</name>
-    <description>Resource Provider with MongoDB Persistence for Apache Sling.</description>
-  
-    <scm>
-        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-nosql-mongodb-resourceprovider.git</connection>
-        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-nosql-mongodb-resourceprovider.git</developerConnection>
-        <url>https://github.com/apache/sling-org-apache-sling-nosql-mongodb-resourceprovider.git</url>
-    </scm>
-
-    <properties>
-        <sling.java.version>7</sling.java.version>
-    </properties>
-  
-    <dependencies>
-  
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.nosql.generic</artifactId>
-            <version>1.1.0</version>
-            <scope>provided</scope>
-        </dependency>
-    
-        <dependency>
-            <groupId>org.mongodb</groupId>
-            <artifactId>mongo-java-driver</artifactId>
-            <version>3.1.1</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.commons.osgi</artifactId>
-            <version>2.2.2</version>
-            <scope>provided</scope>
-        </dependency>
-  
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.5.0</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.testing.logging-mock</artifactId>
-            <version>1.0.0</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.nosql.generic</artifactId>
-            <classifier>tests</classifier>
-            <version>1.1.0</version>
-            <scope>test</scope>
-        </dependency>
-      
-        <dependency>
-            <groupId>javax.jcr</groupId>
-            <artifactId>jcr</artifactId>
-            <version>2.0</version>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-  
-    <build>
-        <plugins>
-    
-          <plugin>
-              <groupId>org.apache.felix</groupId>
-              <artifactId>maven-bundle-plugin</artifactId>
-              <extensions>true</extensions>
-          </plugin>
-    
-          <plugin>
-              <groupId>org.apache.felix</groupId>
-              <artifactId>maven-scr-plugin</artifactId>
-          </plugin>
-    
-          <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-surefire-plugin</artifactId>
-              <configuration>
-                  <testFailureIgnore>false</testFailureIgnore>
-                  <includes>
-                      <include>**/*Test.java</include>
-                  </includes>
-                  <excludes>
-                      <exclude>**/*IT.java</exclude>
-                  </excludes>
-              </configuration>
-          </plugin>
-    
-        </plugins>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <!-- Extend RAT configuration from parent pom -->
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <configuration>
-                        <excludes combine.children="append">
-                            <exclude>README.md</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-    
-    <profiles>
-    
-      <!-- 
-          Profile for Integration tests with a real MongoDB server running.
-          You have to set JVM parameters for MongoDB host and bucket name, e.g.
-          mvn -Pmongodb-integration-test -DmongodbHosts=localhost:8091 -DbucketName=test integration-test
-      -->
-      <profile>
-        <id>mongodb-integration-test</id>
-        <build>
-          <plugins>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-failsafe-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>integration-test</goal>
-                            <goal>verify</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <includes>
-                        <include>**/*IT.java</include>
-                    </includes>
-                    <excludes>
-                        <exclude>**/*Test.java</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-    
-          </plugins>
-        </build>
-      </profile>
-
-    </profiles>
-  
-</project>
diff --git a/src/main/java/org/apache/sling/nosql/mongodb/resourceprovider/impl/MongoDBNoSqlAdapter.java b/src/main/java/org/apache/sling/nosql/mongodb/resourceprovider/impl/MongoDBNoSqlAdapter.java
deleted file mode 100644
index 9b993e4..0000000
--- a/src/main/java/org/apache/sling/nosql/mongodb/resourceprovider/impl/MongoDBNoSqlAdapter.java
+++ /dev/null
@@ -1,163 +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.sling.nosql.mongodb.resourceprovider.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.regex.Pattern;
-
-import org.apache.sling.api.resource.LoginException;
-import org.apache.sling.api.resource.ResourceUtil;
-import org.apache.sling.nosql.generic.adapter.AbstractNoSqlAdapter;
-import org.apache.sling.nosql.generic.adapter.MultiValueMode;
-import org.apache.sling.nosql.generic.adapter.NoSqlData;
-import org.bson.Document;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.mongodb.DuplicateKeyException;
-import com.mongodb.MongoClient;
-import com.mongodb.MongoException;
-import com.mongodb.client.FindIterable;
-import com.mongodb.client.MongoCollection;
-import com.mongodb.client.MongoCursor;
-import com.mongodb.client.MongoDatabase;
-import com.mongodb.client.model.Filters;
-import com.mongodb.client.model.IndexOptions;
-import com.mongodb.client.model.UpdateOptions;
-import com.mongodb.client.result.DeleteResult;
-import com.mongodb.client.result.UpdateResult;
-
-/**
- * {@link org.apache.sling.nosql.generic.adapter.NoSqlAdapter} implementation for MongoDB.
- */
-public final class MongoDBNoSqlAdapter extends AbstractNoSqlAdapter {
-    
-    private static final String PN_PATH = "_id";
-    private static final String PN_PARENT_PATH = "parentPath";
-    private static final String PN_DATA = "data";
-    
-    private final MongoCollection<Document> collection;
-    
-    private static final Logger log = LoggerFactory.getLogger(MongoDBNoSqlAdapter.class);
-    
-    /**
-     * @param mongoClient MongoDB client
-     * @param database MongoDB database
-     * @param collection MongoDB collection
-     */
-    public MongoDBNoSqlAdapter(MongoClient mongoClient, String database, String collection) {
-        MongoDatabase db = mongoClient.getDatabase(database);
-        this.collection = db.getCollection(collection);
-    }
-
-    @Override
-    public NoSqlData get(String path) {
-        Document envelope = collection.find(Filters.eq(PN_PATH, path)).first();
-        if (envelope == null) {
-            return null;
-        }
-        else {
-            return new NoSqlData(path, envelope.get(PN_DATA, Document.class), MultiValueMode.LISTS);
-        }
-    }
-
-    @Override
-    public Iterator<NoSqlData> getChildren(String parentPath) {
-        List<NoSqlData> children = new ArrayList<>();
-        FindIterable<Document> result = collection.find(Filters.eq(PN_PARENT_PATH, parentPath));
-        try (MongoCursor<Document> envelopes = result.iterator()) {
-            while (envelopes.hasNext()) {
-                Document envelope = envelopes.next();
-                String path = envelope.get(PN_PATH, String.class);
-                Document data = envelope.get(PN_DATA, Document.class);
-                children.add(new NoSqlData(path, data, MultiValueMode.LISTS));
-            }
-        }
-        return children.iterator();
-    }
-
-    @Override
-    public boolean store(NoSqlData data) {
-        Document envelope = new Document();
-        envelope.put(PN_PATH, data.getPath());
-        envelope.put(PN_DATA, new Document(data.getProperties(MultiValueMode.LISTS)));
-        
-        // for list-children query efficiency store parent path as well
-        String parentPath = ResourceUtil.getParent(data.getPath());
-        if (parentPath != null) {
-            envelope.put(PN_PARENT_PATH, parentPath);
-        }
-                
-        UpdateResult result = collection.replaceOne(Filters.eq(PN_PATH, data.getPath()), envelope, new UpdateOptions().upsert(true));
-        
-        // return true if a new entry was inserted, false if an existing was replaced
-        return (result.getMatchedCount() == 0);
-    }
-
-    @Override
-    public boolean deleteRecursive(String path) {        
-        Pattern descendantsAndSelf = Pattern.compile("^" + Pattern.quote(path) + "(/.+)?$");
-        DeleteResult result = collection.deleteMany(Filters.regex(PN_PATH, descendantsAndSelf));
-        
-        // return true if any document was deleted
-        return result.getDeletedCount() > 0;
-    }
-
-    @Override
-    public void checkConnection() throws LoginException {
-        // the query is not relevant, just the successful round-trip
-        try {
-            collection.find(Filters.eq(PN_PATH, "/")).first();
-        } catch (MongoException e) {
-            throw new LoginException(e);
-        }
-    }
-
-    @Override
-    public void createIndexDefinitions() {
-        // create index on parent path field (if it does not exist yet)
-        try {
-            Document parenPathtIndex = new Document(PN_PARENT_PATH, 1);
-            this.collection.createIndex(parenPathtIndex);
-        }
-        catch (DuplicateKeyException ex) {
-            // index already exists, ignore
-        }
-        catch (Throwable ex) {
-            log.error("Unable to create index on " + PN_PARENT_PATH + ": " + ex.getMessage(), ex);
-        }
-        
-        // create unique index on path field (if it does not exist yet)
-        try {
-            Document pathIndex = new Document(PN_PATH, 1);
-            IndexOptions idxOptions = new IndexOptions();
-            idxOptions.unique(true);
-            this.collection.createIndex(pathIndex, idxOptions);
-        }
-        catch (DuplicateKeyException ex) {
-            // index already exists, ignore
-        }
-        catch (Throwable ex) {
-            log.error("Unable to create unique index on " + PN_PATH + ": " + ex.getMessage(), ex);
-        }
-    }
-
-}
diff --git a/src/main/java/org/apache/sling/nosql/mongodb/resourceprovider/impl/MongoDBNoSqlResourceProviderFactory.java b/src/main/java/org/apache/sling/nosql/mongodb/resourceprovider/impl/MongoDBNoSqlResourceProviderFactory.java
deleted file mode 100644
index cf697f0..0000000
--- a/src/main/java/org/apache/sling/nosql/mongodb/resourceprovider/impl/MongoDBNoSqlResourceProviderFactory.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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.sling.nosql.mongodb.resourceprovider.impl;
-
-import java.util.Map;
-
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.ConfigurationPolicy;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.Service;
-import org.apache.sling.api.resource.ResourceProvider;
-import org.apache.sling.api.resource.ResourceProviderFactory;
-import org.apache.sling.commons.osgi.PropertiesUtil;
-import org.apache.sling.nosql.generic.adapter.MetricsNoSqlAdapterWrapper;
-import org.apache.sling.nosql.generic.adapter.NoSqlAdapter;
-import org.apache.sling.nosql.generic.resource.AbstractNoSqlResourceProviderFactory;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.service.event.EventAdmin;
-import org.slf4j.LoggerFactory;
-
-import com.mongodb.MongoClient;
-
-import aQute.bnd.annotation.component.Deactivate;
-
-/**
- * {@link ResourceProviderFactory} implementation that uses MongoDB as persistence.
- */
-@Component(immediate = true, metatype = true,
-    name="org.apache.sling.nosql.mongodb.resourceprovider.MongoDBNoSqlResourceProviderFactory.factory.config",
-    label = "Apache Sling NoSQL MongoDB Resource Provider Factory", 
-    description = "Defines a resource provider factory with MongoDB persistence.", 
-    configurationFactory = true, policy = ConfigurationPolicy.REQUIRE)
-@Service(value = ResourceProviderFactory.class)
-@Property(name = "webconsole.configurationFactory.nameHint", 
-    value = "Root paths: {" + MongoDBNoSqlResourceProviderFactory.PROVIDER_ROOTS_PROPERTY + "}")
-public final class MongoDBNoSqlResourceProviderFactory extends AbstractNoSqlResourceProviderFactory {
-
-    @Property(label = "Root paths", description = "Root paths for resource provider.", cardinality = Integer.MAX_VALUE)
-    static final String PROVIDER_ROOTS_PROPERTY = ResourceProvider.ROOTS;
-    
-    @Property(label = "Connection String",
-            description = "MongoDB connection String. Example: 'localhost:27017,localhost:27018,localhost:27019'",
-            value = MongoDBNoSqlResourceProviderFactory.CONNECTION_STRING_DEFAULT)
-    static final String CONNECTION_STRING_PROPERTY = "connectionString";
-    private static final String CONNECTION_STRING_DEFAULT = "localhost:27017";
-    
-    @Property(label = "Database",
-            description = "MongoDB database to store resource data in.",
-            value = MongoDBNoSqlResourceProviderFactory.DATABASE_DEFAULT)
-    static final String DATABASE_PROPERTY = "database";
-    private static final String DATABASE_DEFAULT = "sling";
-    
-    @Property(label = "Collection",
-            description = "MongoDB collection to store resource data in.",
-            value = MongoDBNoSqlResourceProviderFactory.COLLECTION_DEFAULT)
-    static final String COLLECTION_PROPERTY = "collection";
-    private static final String COLLECTION_DEFAULT = "resources";
-    
-    @Reference
-    private EventAdmin eventAdmin;
-
-    private MongoClient mongoClient;
-    private NoSqlAdapter noSqlAdapter;
-
-    @Activate
-    private void activate(ComponentContext componentContext, Map<String, Object> config) {
-        String connectionString = PropertiesUtil.toString(config.get(CONNECTION_STRING_PROPERTY), CONNECTION_STRING_DEFAULT);
-        String database = PropertiesUtil.toString(config.get(DATABASE_PROPERTY), DATABASE_DEFAULT);
-        String collection = PropertiesUtil.toString(config.get(COLLECTION_PROPERTY), COLLECTION_DEFAULT);
-        
-        mongoClient = new MongoClient(connectionString);
-        NoSqlAdapter mongodbAdapter = new MongoDBNoSqlAdapter(mongoClient, database, collection);
-        
-        // enable call logging and metrics for {@link MongoDBNoSqlAdapter}
-        noSqlAdapter = new MetricsNoSqlAdapterWrapper(mongodbAdapter, LoggerFactory.getLogger(MongoDBNoSqlAdapter.class));
-    }
-    
-    @Deactivate
-    private void deactivate() {
-        if (mongoClient != null) {
-            mongoClient.close();
-        }
-    }
-
-    @Override
-    protected NoSqlAdapter getNoSqlAdapter() {
-        return noSqlAdapter;
-    }
-
-    @Override
-    protected EventAdmin getEventAdmin() {
-        return eventAdmin;
-    }
-
-}
diff --git a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/IndexCreationIT.java b/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/IndexCreationIT.java
deleted file mode 100644
index 28f1256..0000000
--- a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/IndexCreationIT.java
+++ /dev/null
@@ -1,78 +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.sling.nosql.mongodb.resourceprovider.integration;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlAdapter;
-import org.bson.Document;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableList;
-import com.mongodb.MongoClient;
-
-/**
- * Test creation of indexes in MongoDB
- */
-public class IndexCreationIT {
-
-	private MongoDBNoSqlAdapter underTest;
-	
-	private MongoClient mongoClient;
-	private String database;
-	private String collection;
-		
-	@Before
-	public void setUp() throws Exception {
-	    String connectionString = System.getProperty("connectionString", "localhost:27017");
-        database =  System.getProperty("database", "sling") + "_indextest";
-        collection = System.getProperty("collection", "resources");
-		mongoClient = new MongoClient(connectionString);
-		underTest = new MongoDBNoSqlAdapter(mongoClient, database, collection);
-		underTest.checkConnection();
-		underTest.createIndexDefinitions();
-	}
-
-	@After
-	public void tearDown() {
-		mongoClient.dropDatabase(database);
-		mongoClient.close();
-	}
-
-	@Test
-	public void testIndexesPresent() {
-		assertNotNull(underTest);
-		
-		final List<String> expectedIndexNames= ImmutableList.<String>of("_id_", "parentPath_1");
-		
-		List<String> actualIndexNames = new ArrayList<String>();
-		for (Document d : mongoClient.getDatabase(database).getCollection(collection).listIndexes()) {
-		    actualIndexNames.add(d.get("name").toString());
-		}
-		
-		assertEquals(expectedIndexNames, actualIndexNames);
-	}
-
-}
diff --git a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderIT.java b/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderIT.java
deleted file mode 100644
index 4126f54..0000000
--- a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderIT.java
+++ /dev/null
@@ -1,69 +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.sling.nosql.mongodb.resourceprovider.integration;
-
-import java.util.UUID;
-
-import org.apache.jackrabbit.JcrConstants;
-import org.apache.sling.api.resource.PersistenceException;
-import org.apache.sling.api.resource.Resource;
-import org.apache.sling.api.resource.ResourceProvider;
-import org.apache.sling.nosql.generic.resource.impl.AbstractNoSqlResourceProviderTest;
-import org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlResourceProviderFactory;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Test basic ResourceResolver and ValueMap with different data types.
- */
-public class MongoDBNoSqlResourceProviderIT extends AbstractNoSqlResourceProviderTest {
-
-    private Resource testRoot;
-
-    @Override
-    protected void registerResourceProviderFactory() {
-        context.registerInjectActivateService(new MongoDBNoSqlResourceProviderFactory(), ImmutableMap.<String, Object>builder()
-                .put(ResourceProvider.ROOTS, "/test")
-                .put("connectionString", System.getProperty("connectionString", "localhost:27017"))
-                .put("database", System.getProperty("database", "sling"))
-                .put("collection", System.getProperty("collection", "resources"))
-                .build());
-    }
-
-    @Override
-    protected Resource testRoot() {
-        if (this.testRoot == null) {
-            try {
-                Resource root = context.resourceResolver().getResource("/");
-                Resource providerRoot = root.getChild("test");
-                if (providerRoot == null) {
-                    providerRoot = context.resourceResolver().create(root, "test",
-                            ImmutableMap.<String, Object>of(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_UNSTRUCTURED));
-                }
-                this.testRoot = context.resourceResolver().create(providerRoot, UUID.randomUUID().toString(),
-                        ImmutableMap.<String, Object>of(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_UNSTRUCTURED));
-            }
-            catch (PersistenceException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-        return this.testRoot;
-    }
-
-}
diff --git a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderRootIT.java b/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderRootIT.java
deleted file mode 100644
index 4a28224..0000000
--- a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderRootIT.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.sling.nosql.mongodb.resourceprovider.integration;
-
-import org.apache.sling.api.resource.ResourceProvider;
-import org.apache.sling.nosql.generic.resource.impl.AbstractNoSqlResourceProviderRootTest;
-import org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlResourceProviderFactory;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Test basic ResourceResolver and ValueMap with different data types.
- */
-public class MongoDBNoSqlResourceProviderRootIT extends AbstractNoSqlResourceProviderRootTest {
-    
-    @Override
-    protected void registerResourceProviderFactoryAsRoot() {
-        context.registerInjectActivateService(new MongoDBNoSqlResourceProviderFactory(), ImmutableMap.<String, Object>builder()
-                .put(ResourceProvider.ROOTS, "/")
-                .put("connectionString", System.getProperty("connectionString", "localhost:27017"))
-                .put("database", System.getProperty("database", "sling"))
-                .put("collection", System.getProperty("collection", "resources"))
-                .build());
-    }
-
-}
diff --git a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderTransactionalIT.java b/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderTransactionalIT.java
deleted file mode 100644
index 9325496..0000000
--- a/src/test/java/org/apache/sling/nosql/mongodb/resourceprovider/integration/MongoDBNoSqlResourceProviderTransactionalIT.java
+++ /dev/null
@@ -1,69 +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.sling.nosql.mongodb.resourceprovider.integration;
-
-import java.util.UUID;
-
-import org.apache.jackrabbit.JcrConstants;
-import org.apache.sling.api.resource.PersistenceException;
-import org.apache.sling.api.resource.Resource;
-import org.apache.sling.api.resource.ResourceProvider;
-import org.apache.sling.nosql.generic.resource.impl.AbstractNoSqlResourceProviderTransactionalTest;
-import org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlResourceProviderFactory;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Test basic ResourceResolver and ValueMap with different data types.
- */
-public class MongoDBNoSqlResourceProviderTransactionalIT extends AbstractNoSqlResourceProviderTransactionalTest {
-
-    private Resource testRoot;
-
-    @Override
-    protected void registerResourceProviderFactory() {
-        context.registerInjectActivateService(new MongoDBNoSqlResourceProviderFactory(), ImmutableMap.<String, Object>builder()
-                .put(ResourceProvider.ROOTS, "/test")
-                .put("connectionString", System.getProperty("connectionString", "localhost:27017"))
-                .put("database", System.getProperty("database", "sling"))
-                .put("collection", System.getProperty("collection", "resources"))
-                .build());
-    }
-
-    @Override
-    protected Resource testRoot() {
-        if (this.testRoot == null) {
-            try {
-                Resource root = context.resourceResolver().getResource("/");
-                Resource providerRoot = root.getChild("test");
-                if (providerRoot == null) {
-                    providerRoot = context.resourceResolver().create(root,"test",
-                            ImmutableMap.<String, Object>of(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_UNSTRUCTURED));
-                }
-                this.testRoot = context.resourceResolver().create(providerRoot, UUID.randomUUID().toString(),
-                        ImmutableMap.<String, Object>of(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_UNSTRUCTURED));
-            }
-            catch (PersistenceException ex) {
-                throw new RuntimeException(ex);
-            }
-        }
-        return this.testRoot;
-    }
-
-}