You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ju...@apache.org on 2010/02/11 03:13:07 UTC

svn commit: r908798 - in /sling/trunk: bundles/jcr/api/ bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/ bundles/jcr/bas...

Author: justin
Date: Thu Feb 11 02:13:07 2010
New Revision: 908798

URL: http://svn.apache.org/viewvc?rev=908798&view=rev
Log:
SLING-1363 - removing SessionConfigurer interface and moving NamespaceMapper from base to api. Created tests for both dynamic NamespaceMapper and static Sling-Namespaces namespace registration. Note - this involved updating the version of jcr.api in the bundle list file which also required including the JCR 2 API bundle.

Added:
    sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/NamespaceMapper.java
      - copied, changed from r908780, sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/NamespaceMapper.java
    sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/jcr/
    sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/jcr/TestNamespaceMapper.java
      - copied, changed from r908780, sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/SessionConfigurer.java
    sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/NamespaceTestServlet.java
    sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/NamespaceMappingTest.java
Removed:
    sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/SessionConfigurer.java
    sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/NamespaceMapper.java
Modified:
    sling/trunk/bundles/jcr/api/pom.xml
    sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
    sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/loader/Loader.java
    sling/trunk/launchpad/builder/src/main/bundles/list.xml
    sling/trunk/launchpad/test-services/pom.xml

Modified: sling/trunk/bundles/jcr/api/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/api/pom.xml?rev=908798&r1=908797&r2=908798&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/api/pom.xml (original)
+++ sling/trunk/bundles/jcr/api/pom.xml Thu Feb 11 02:13:07 2010
@@ -7,9 +7,9 @@
     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
@@ -57,8 +57,8 @@
                         </Bundle-Category>
                         <Export-Package>
                             <!-- Export provider API selectively -->
-                            org.apache.sling.jcr.api;version=2.0.2
-                        </Export-Package>    
+                            org.apache.sling.jcr.api;version=2.0.4
+                        </Export-Package>
                     </instructions>
                 </configuration>
             </plugin>

Copied: sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/NamespaceMapper.java (from r908780, sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/NamespaceMapper.java)
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/NamespaceMapper.java?p2=sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/NamespaceMapper.java&p1=sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/NamespaceMapper.java&r1=908780&r2=908798&rev=908798&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/NamespaceMapper.java (original)
+++ sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/NamespaceMapper.java Thu Feb 11 02:13:07 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.jcr.base.internal;
+package org.apache.sling.jcr.api;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
@@ -27,6 +27,8 @@
  */
 public interface NamespaceMapper {
 
+    static final String SERVICE_NAME = "org.apache.sling.jcr.api.NamespaceMapper";
+
     void defineNamespacePrefixes(Session session)
     throws RepositoryException;
 }

Modified: sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java?rev=908798&r1=908797&r2=908798&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java (original)
+++ sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java Thu Feb 11 02:13:07 2010
@@ -30,7 +30,7 @@
 import javax.jcr.Workspace;
 
 import org.apache.jackrabbit.api.JackrabbitWorkspace;
-import org.apache.sling.jcr.api.SessionConfigurer;
+import org.apache.sling.jcr.api.NamespaceMapper;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.base.internal.loader.Loader;
 import org.apache.sling.jcr.base.util.RepositoryAccessor;
@@ -133,7 +133,7 @@
     // the background thread constantly checking the repository
     private Thread repositoryPinger;
 
-    private ServiceTracker sessionConfigurerTracker;
+    private ServiceTracker namespaceMapperTracker;
 
     protected AbstractSlingRepository() {
     }
@@ -229,18 +229,7 @@
                 setDefaultWorkspace(defaultWorkspace);
             }
 
-            if (this.loader != null) {
-                // apply namespace mapping
-                this.loader.defineNamespacePrefixes(session);
-            }
-
-            // call post processors
-            Object[] postProcessors = sessionConfigurerTracker.getServices();
-            if (postProcessors != null) {
-                for (int i = 0; i < postProcessors.length; i++) {
-                    ((SessionConfigurer) postProcessors[i]).configure(session);
-                }
-            }
+            defineNamespacePrefixes(session);
 
             return session;
 
@@ -588,8 +577,8 @@
 
         componentContext.getBundleContext().addBundleListener(this);
 
-        this.sessionConfigurerTracker = new ServiceTracker(componentContext.getBundleContext(), SessionConfigurer.SERVICE_NAME, null);
-        this.sessionConfigurerTracker.open();
+        this.namespaceMapperTracker = new ServiceTracker(componentContext.getBundleContext(), NamespaceMapper.SERVICE_NAME, null);
+        this.namespaceMapperTracker.open();
 
         // immediately try to start the repository while activating
         // this component instance
@@ -615,7 +604,7 @@
      * @param componentContext
      */
     protected void deactivate(ComponentContext componentContext) {
-        this.sessionConfigurerTracker.close();
+        this.namespaceMapperTracker.close();
 
         componentContext.getBundleContext().removeBundleListener(this);
 
@@ -704,6 +693,21 @@
         return false;
     }
 
+    private void defineNamespacePrefixes(final Session session) throws RepositoryException {
+        if (this.loader != null) {
+            // apply namespace mapping
+            this.loader.defineNamespacePrefixes(session);
+        }
+
+        // call post processors
+        Object[] postProcessors = namespaceMapperTracker.getServices();
+        if (postProcessors != null) {
+            for (int i = 0; i < postProcessors.length; i++) {
+                ((NamespaceMapper) postProcessors[i]).defineNamespacePrefixes(session);
+            }
+        }
+    }
+
     // ---------- Background operation checking repository availability --------
 
     private void setPollTimeActive(int seconds) {

Modified: sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/loader/Loader.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/loader/Loader.java?rev=908798&r1=908797&r2=908798&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/loader/Loader.java (original)
+++ sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/loader/Loader.java Thu Feb 11 02:13:07 2010
@@ -33,9 +33,9 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import org.apache.sling.jcr.api.NamespaceMapper;
 import org.apache.sling.jcr.base.AbstractSlingRepository;
 import org.apache.sling.jcr.base.NodeTypeLoader;
-import org.apache.sling.jcr.base.internal.NamespaceMapper;
 import org.osgi.framework.Bundle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: sling/trunk/launchpad/builder/src/main/bundles/list.xml
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/builder/src/main/bundles/list.xml?rev=908798&r1=908797&r2=908798&view=diff
==============================================================================
--- sling/trunk/launchpad/builder/src/main/bundles/list.xml (original)
+++ sling/trunk/launchpad/builder/src/main/bundles/list.xml Thu Feb 11 02:13:07 2010
@@ -237,7 +237,12 @@
         <bundle>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.jcr.api</artifactId>
-            <version>2.0.2-incubator</version>
+            <version>2.0.7-SNAPSHOT</version>
+        </bundle>
+        <bundle>
+            <groupId>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+            <version>2.0</version>
         </bundle>
         <bundle>
             <groupId>org.apache.sling</groupId>

Modified: sling/trunk/launchpad/test-services/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/test-services/pom.xml?rev=908798&r1=908797&r2=908798&view=diff
==============================================================================
--- sling/trunk/launchpad/test-services/pom.xml (original)
+++ sling/trunk/launchpad/test-services/pom.xml Thu Feb 11 02:13:07 2010
@@ -57,6 +57,9 @@
                         <Private-Package>
                             org.apache.sling.launchpad.testservices.*
                         </Private-Package>
+                        <Sling-Namespaces>
+                            test1=http://sling.apache.org/test/one
+                        </Sling-Namespaces>
                         <Sling-Nodetypes>
                             SLING-INF/nodetypes/test.cnd
                         </Sling-Nodetypes>
@@ -78,6 +81,11 @@
         </dependency>
         <dependency>
             <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.jcr.api</artifactId>
+            <version>2.0.7-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.scripting.api</artifactId>
             <version>2.1.0-SNAPSHOT</version>
         </dependency>
@@ -93,6 +101,10 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

Copied: sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/jcr/TestNamespaceMapper.java (from r908780, sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/SessionConfigurer.java)
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/jcr/TestNamespaceMapper.java?p2=sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/jcr/TestNamespaceMapper.java&p1=sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/SessionConfigurer.java&r1=908780&r2=908798&rev=908798&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/SessionConfigurer.java (original)
+++ sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/jcr/TestNamespaceMapper.java Thu Feb 11 02:13:07 2010
@@ -14,22 +14,27 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.sling.jcr.api;
+package org.apache.sling.launchpad.testservices.jcr;
 
+import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import org.apache.sling.jcr.api.NamespaceMapper;
+
 /**
- * Service interface which allows for the JCR Sessions produced by
- * SlingRepository instances to be configured programmatically.
+ * Test Implementation of NamespaceMapper
+ *
+ * @scr.component immediate="true" metatype="no"
+ * @scr.service interface="org.apache.sling.jcr.api.NamespaceMapper"
+ *
+ * @scr.property name="service.description" value="Test NamespaceMapper"
+ * @scr.property name="service.vendor" value="The Apache Software Foundation"
+ *
  */
-public interface SessionConfigurer {
+public class TestNamespaceMapper implements NamespaceMapper {
 
-    static final String SERVICE_NAME = "org.apache.sling.jcr.api.SessionConfigurer";
+    public void defineNamespacePrefixes(Session session) throws RepositoryException {
+        session.setNamespacePrefix("test2", "test2=http://sling.apache.org/test/two");
+    }
 
-    /**
-     * Configure the Session instance as necessary.
-     *
-     * @param session the JCR Session
-     */
-    void configure(Session session);
 }

Added: sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/NamespaceTestServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/NamespaceTestServlet.java?rev=908798&view=auto
==============================================================================
--- sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/NamespaceTestServlet.java (added)
+++ sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets/NamespaceTestServlet.java Thu Feb 11 02:13:07 2010
@@ -0,0 +1,66 @@
+/*
+ * 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.launchpad.testservices.servlets;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.servlet.ServletException;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
+
+/**
+ * Test Servlet which outputs the current namespace mappings.
+ *
+ * @scr.component immediate="true" metatype="no"
+ * @scr.service interface="javax.servlet.Servlet"
+ *
+ * @scr.property name="service.description"
+ *               value="NamespaceMapping Test Servlet"
+ * @scr.property name="service.vendor" value="The Apache Software Foundation"
+ *
+ * @scr.property name="sling.servlet.paths"
+ *               values.0="/testing/NamespaceTestServlet/output"
+ *
+ */
+@SuppressWarnings("serial")
+public class NamespaceTestServlet extends SlingSafeMethodsServlet {
+
+    @Override
+    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException,
+            IOException {
+        try {
+            response.setContentType("text/plain");
+            Session session = request.getResourceResolver().adaptTo(Session.class);
+
+            response.getWriter().printf("userid=%s", session.getUserID());
+            response.getWriter().println();
+
+            for (String prefix : session.getNamespacePrefixes()) {
+                response.getWriter().printf("%s=%s", prefix, session.getNamespaceURI(prefix));
+                response.getWriter().println();
+            }
+            response.getWriter().flush();
+        } catch (RepositoryException e) {
+            throw new ServletException("Unable to output namespace mappings", e);
+        }
+    }
+
+}

Added: sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/NamespaceMappingTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/NamespaceMappingTest.java?rev=908798&view=auto
==============================================================================
--- sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/NamespaceMappingTest.java (added)
+++ sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/NamespaceMappingTest.java Thu Feb 11 02:13:07 2010
@@ -0,0 +1,48 @@
+/*
+ * 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.launchpad.webapp.integrationtest;
+
+import java.io.IOException;
+
+import org.apache.sling.commons.testing.integration.HttpTestBase;
+
+/**
+ * Test that both Sling-Namespaces and {@link NamespaceMapper} work.
+ */
+public class NamespaceMappingTest extends HttpTestBase {
+
+    /**
+     * Verify that Sling-Namespaces works.
+     */
+    public void testNamespaceFromManifest() throws IOException {
+        final String expected = "test1=http://sling.apache.org/test/one";
+        final String content = getContent(HTTP_BASE_URL + "/testing/NamespaceTestServlet/output",
+                CONTENT_TYPE_PLAIN);
+        assertTrue("Content contains " + expected + " (" + content + ")", content.contains(expected));
+    }
+
+    /**
+     * Verify that {@link NamespaceMapper} works.
+     */
+    public void testNamespaceFromNamespaceMapper() throws IOException {
+        final String expected = "test2=http://sling.apache.org/test/two";
+        final String content = getContent(HTTP_BASE_URL + "/testing/NamespaceTestServlet/output",
+                CONTENT_TYPE_PLAIN);
+        assertTrue("Content contains " + expected + " (" + content + ")", content.contains(expected));
+    }
+
+}



Re: svn commit: r908798 - in /sling/trunk: bundles/jcr/api/ bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/ bundles/jcr/bas...

Posted by Justin Edelson <ju...@gmail.com>.
Felix basically captured why I did this - jcr.api has a new interface
(NamespaceMapper) which jcr.base now depends upon. And obviously, all
the bundles which import javax.jcr allow for version 2.0 to be used.

That said, I would really like to see trunk upgraded to JCR 2/Jackrabbit
2 throughout. I don't mind maintaining a branch for this purpose, but
would obviously prefer not to.

Justin


On 2/11/10 3:38 AM, Ian Boston wrote:
> 
> On 11 Feb 2010, at 08:32, Felix Meschberger wrote:
> 
>> Hi,
>>
>> At first I am as concerned as you are.
>>
>> Yet, I could justify such a move as follows:
>>
>>  * jcr.api provides a new Service Interface
>>  * jcr.api does not export the official JCR API any longer
>>  * we need a JCR API in Sling
>>
>> So, while I really think we should keep the default JCR API dependency
>> to 1.0 in Sling, it looks ok to deploy the JCR 2.0 API in Sling.
>>
>> Another solution would be to provide a transitional JCR 1.0 API wrapper
>> bundle in Sling.
>>
>> WDYT ?
> 
> That sounds fine, no need for a wrapper, just so we know that until the jump to 2.0 is made in the server bundle everything will continue to work with the 1.0 compliant server bundle.
> 
> Thanks
> Ian
> 
>>
>> Regards
>> Felix
>>
>> On 11.02.2010 09:25, Ian Boston wrote:
>>> Justin, all, 
>>>
>>> If there is going to be a transition to Jackrabbit 2, can we please make certain that there is a known commit in a stable state which people can bind to if they are working to milestone deadlines. 
>>>
>>> I haven't worked through the details of including the JCR 2.0 API yet, but I am nervous having it there with a JCR 1.0 implementation might cause problems. Is it going to cause problems ?
>>>
>>> Ian
>>>
>>> On 11 Feb 2010, at 02:13, justin@apache.org wrote:
>>>
>>>> +++ sling/trunk/launchpad/builder/src/main/bundles/list.xml Thu Feb 11 02:13:07 2010
>>>> @@ -237,7 +237,12 @@
>>>>        <bundle>
>>>>            <groupId>org.apache.sling</groupId>
>>>>            <artifactId>org.apache.sling.jcr.api</artifactId>
>>>> -            <version>2.0.2-incubator</version>
>>>> +            <version>2.0.7-SNAPSHOT</version>
>>>> +        </bundle>
>>>> +        <bundle>
>>>> +            <groupId>javax.jcr</groupId>
>>>> +            <artifactId>jcr</artifactId>
>>>> +            <version>2.0</version>
>>>>        </bundle>
>>>>        <bundle>
>>>>            <groupId>org.apache.sling</groupId>
>>>
>>>
> 


Re: svn commit: r908798 - in /sling/trunk: bundles/jcr/api/ bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/ bundles/jcr/bas...

Posted by Ian Boston <ie...@tfd.co.uk>.
On 11 Feb 2010, at 08:32, Felix Meschberger wrote:

> Hi,
> 
> At first I am as concerned as you are.
> 
> Yet, I could justify such a move as follows:
> 
>  * jcr.api provides a new Service Interface
>  * jcr.api does not export the official JCR API any longer
>  * we need a JCR API in Sling
> 
> So, while I really think we should keep the default JCR API dependency
> to 1.0 in Sling, it looks ok to deploy the JCR 2.0 API in Sling.
> 
> Another solution would be to provide a transitional JCR 1.0 API wrapper
> bundle in Sling.
> 
> WDYT ?

That sounds fine, no need for a wrapper, just so we know that until the jump to 2.0 is made in the server bundle everything will continue to work with the 1.0 compliant server bundle.

Thanks
Ian

> 
> Regards
> Felix
> 
> On 11.02.2010 09:25, Ian Boston wrote:
>> Justin, all, 
>> 
>> If there is going to be a transition to Jackrabbit 2, can we please make certain that there is a known commit in a stable state which people can bind to if they are working to milestone deadlines. 
>> 
>> I haven't worked through the details of including the JCR 2.0 API yet, but I am nervous having it there with a JCR 1.0 implementation might cause problems. Is it going to cause problems ?
>> 
>> Ian
>> 
>> On 11 Feb 2010, at 02:13, justin@apache.org wrote:
>> 
>>> +++ sling/trunk/launchpad/builder/src/main/bundles/list.xml Thu Feb 11 02:13:07 2010
>>> @@ -237,7 +237,12 @@
>>>        <bundle>
>>>            <groupId>org.apache.sling</groupId>
>>>            <artifactId>org.apache.sling.jcr.api</artifactId>
>>> -            <version>2.0.2-incubator</version>
>>> +            <version>2.0.7-SNAPSHOT</version>
>>> +        </bundle>
>>> +        <bundle>
>>> +            <groupId>javax.jcr</groupId>
>>> +            <artifactId>jcr</artifactId>
>>> +            <version>2.0</version>
>>>        </bundle>
>>>        <bundle>
>>>            <groupId>org.apache.sling</groupId>
>> 
>> 


Re: svn commit: r908798 - in /sling/trunk: bundles/jcr/api/ bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/ bundles/jcr/bas...

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

At first I am as concerned as you are.

Yet, I could justify such a move as follows:

  * jcr.api provides a new Service Interface
  * jcr.api does not export the official JCR API any longer
  * we need a JCR API in Sling

So, while I really think we should keep the default JCR API dependency
to 1.0 in Sling, it looks ok to deploy the JCR 2.0 API in Sling.

Another solution would be to provide a transitional JCR 1.0 API wrapper
bundle in Sling.

WDYT ?

Regards
Felix

On 11.02.2010 09:25, Ian Boston wrote:
> Justin, all, 
> 
> If there is going to be a transition to Jackrabbit 2, can we please make certain that there is a known commit in a stable state which people can bind to if they are working to milestone deadlines. 
> 
> I haven't worked through the details of including the JCR 2.0 API yet, but I am nervous having it there with a JCR 1.0 implementation might cause problems. Is it going to cause problems ?
> 
> Ian
> 
> On 11 Feb 2010, at 02:13, justin@apache.org wrote:
> 
>> +++ sling/trunk/launchpad/builder/src/main/bundles/list.xml Thu Feb 11 02:13:07 2010
>> @@ -237,7 +237,12 @@
>>         <bundle>
>>             <groupId>org.apache.sling</groupId>
>>             <artifactId>org.apache.sling.jcr.api</artifactId>
>> -            <version>2.0.2-incubator</version>
>> +            <version>2.0.7-SNAPSHOT</version>
>> +        </bundle>
>> +        <bundle>
>> +            <groupId>javax.jcr</groupId>
>> +            <artifactId>jcr</artifactId>
>> +            <version>2.0</version>
>>         </bundle>
>>         <bundle>
>>             <groupId>org.apache.sling</groupId>
> 
> 

Re: svn commit: r908798 - in /sling/trunk: bundles/jcr/api/ bundles/jcr/api/src/main/java/org/apache/sling/jcr/api/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/ bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/internal/ bundles/jcr/bas...

Posted by Ian Boston <ie...@tfd.co.uk>.
Justin, all, 

If there is going to be a transition to Jackrabbit 2, can we please make certain that there is a known commit in a stable state which people can bind to if they are working to milestone deadlines. 

I haven't worked through the details of including the JCR 2.0 API yet, but I am nervous having it there with a JCR 1.0 implementation might cause problems. Is it going to cause problems ?

Ian

On 11 Feb 2010, at 02:13, justin@apache.org wrote:

> +++ sling/trunk/launchpad/builder/src/main/bundles/list.xml Thu Feb 11 02:13:07 2010
> @@ -237,7 +237,12 @@
>         <bundle>
>             <groupId>org.apache.sling</groupId>
>             <artifactId>org.apache.sling.jcr.api</artifactId>
> -            <version>2.0.2-incubator</version>
> +            <version>2.0.7-SNAPSHOT</version>
> +        </bundle>
> +        <bundle>
> +            <groupId>javax.jcr</groupId>
> +            <artifactId>jcr</artifactId>
> +            <version>2.0</version>
>         </bundle>
>         <bundle>
>             <groupId>org.apache.sling</groupId>