You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2010/03/21 19:35:16 UTC

svn commit: r925857 - in /james/server/trunk: pom.xml smtpserver/pom.xml spring-deployment/pom.xml spring-deployment/src/main/config/james/jcr-repository.xml spring-deployment/src/main/config/james/spring-beans.xml

Author: norman
Date: Sun Mar 21 18:35:16 2010
New Revision: 925857

URL: http://svn.apache.org/viewvc?rev=925857&view=rev
Log:
Add JCR imap implementation (JAMES-982)

Added:
    james/server/trunk/spring-deployment/src/main/config/james/jcr-repository.xml
Modified:
    james/server/trunk/pom.xml
    james/server/trunk/smtpserver/pom.xml
    james/server/trunk/spring-deployment/pom.xml
    james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml

Modified: james/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/pom.xml?rev=925857&r1=925856&r2=925857&view=diff
==============================================================================
--- james/server/trunk/pom.xml (original)
+++ james/server/trunk/pom.xml Sun Mar 21 18:35:16 2010
@@ -722,7 +722,7 @@
     <dependency>
       <groupId>commons-configuration</groupId>
       <artifactId>commons-configuration</artifactId>
-      <version>1.5</version>
+      <version>1.6</version>
       <exclusions>
         <exclusion>
           <artifactId>commons-digester</artifactId>
@@ -953,7 +953,13 @@
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
-      <version>1.3.0</version>
+      <version>1.5.8</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.5.8</version>
       <scope>runtime</scope>
     </dependency>
     <dependency>
@@ -977,7 +983,6 @@
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
       <version>2.0.0</version>
-      <scope>test</scope>
     </dependency>
    
     <dependency>

Modified: james/server/trunk/smtpserver/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver/pom.xml?rev=925857&r1=925856&r2=925857&view=diff
==============================================================================
--- james/server/trunk/smtpserver/pom.xml (original)
+++ james/server/trunk/smtpserver/pom.xml Sun Mar 21 18:35:16 2010
@@ -148,6 +148,11 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
    	  <groupId>junit</groupId>
       <artifactId>junit</artifactId>
     </dependency>

Modified: james/server/trunk/spring-deployment/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/pom.xml?rev=925857&r1=925856&r2=925857&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/pom.xml (original)
+++ james/server/trunk/spring-deployment/pom.xml Sun Mar 21 18:35:16 2010
@@ -347,7 +347,11 @@
       <artifactId>james-server-jcr-store</artifactId>
       <scope>runtime</scope>
     </dependency>
-    
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>jackrabbit-core</artifactId>
+      <scope>runtime</scope>
+    </dependency>    
 	
 	<dependency>
       <groupId>org.apache.derby</groupId>
@@ -364,7 +368,6 @@
       <artifactId>apache-james-imap-jcr</artifactId>
       <scope>runtime</scope>
     </dependency>
-    
     <dependency>
       <groupId>org.apache.james</groupId>
       <artifactId>apache-james-imap-processor</artifactId>

Added: james/server/trunk/spring-deployment/src/main/config/james/jcr-repository.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/config/james/jcr-repository.xml?rev=925857&view=auto
==============================================================================
--- james/server/trunk/spring-deployment/src/main/config/james/jcr-repository.xml (added)
+++ james/server/trunk/spring-deployment/src/main/config/james/jcr-repository.xml Sun Mar 21 18:35:16 2010
@@ -0,0 +1,145 @@
+<?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 Repository
+          PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
+          "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
+
+<!-- Example Repository Configuration File
+     Used by
+     - org.apache.jackrabbit.core.config.RepositoryConfigTest.java
+     -
+-->
+<Repository>
+    <!--
+        virtual file system where the repository stores global state
+        (e.g. registered namespaces, custom node types, etc.)
+    -->
+    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+        <param name="path" value="${rep.home}/repository"/>
+    </FileSystem>
+
+    <!--
+        data store configuration
+    -->
+    <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>
+
+    <!--
+        security configuration
+    -->
+    <Security appName="Jackrabbit">
+        <!--
+            security manager:
+            class: FQN of class implementing the JackrabbitSecurityManager interface
+        -->
+        <SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security">
+            <!--
+            workspace access:
+            class: FQN of class implementing the WorkspaceAccessManager interface
+            -->
+            <!-- <WorkspaceAccessManager class="..."/> -->
+            <!-- <param name="config" value="${rep.home}/security.xml"/> -->
+        </SecurityManager>
+
+        <!--
+            access manager:
+            class: FQN of class implementing the AccessManager interface
+        -->
+        <AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
+            <!-- <param name="config" value="${rep.home}/access.xml"/> -->
+        </AccessManager>
+
+        <LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
+           <!-- 
+              anonymous user name ('anonymous' is the default value)
+            -->
+           <param name="anonymousId" value="anonymous"/>
+           <!--
+              administrator user id (default value if param is missing is 'admin')
+            -->
+           <param name="adminId" value="admin"/>
+        </LoginModule>
+    </Security>
+
+    <!--
+        location of workspaces root directory and name of default workspace
+    -->
+    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="james"/>
+    <!--
+        workspace configuration template:
+        used to create the initial workspace if there's no workspace yet
+    -->
+    <Workspace name="${wsp.name}">
+        <!--
+            virtual file system of the workspace:
+            class: FQN of class implementing the FileSystem interface
+        -->
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${wsp.home}"/>
+        </FileSystem>
+        <!--
+            persistence manager of the workspace:
+            class: FQN of class implementing the PersistenceManager interface
+        -->
+        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+          <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
+          <param name="schemaObjectPrefix" value="${wsp.name}_"/>
+        </PersistenceManager>
+        <!--
+            Search index and the file system it uses.
+            class: FQN of class implementing the QueryHandler interface
+        -->
+        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+            <param name="path" value="${wsp.home}/index"/>
+            <param name="supportHighlighting" value="true"/>
+        </SearchIndex>
+    </Workspace>
+
+    <!--
+        Configures the versioning
+    -->
+    <Versioning rootPath="${rep.home}/version">
+        <!--
+            Configures the filesystem to use for versioning for the respective
+            persistence manager
+        -->
+        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
+            <param name="path" value="${rep.home}/version" />
+        </FileSystem>
+
+        <!--
+            Configures the persistence manager to be used for persisting version state.
+            Please note that the current versioning implementation is based on
+            a 'normal' persistence manager, but this could change in future
+            implementations.
+        -->
+        <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
+          <param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
+          <param name="schemaObjectPrefix" value="version_"/>
+        </PersistenceManager>
+    </Versioning>
+
+    <!--
+        Search index for content that is shared repository wide
+        (/jcr:system tree, contains mainly versions)
+    -->
+    <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
+        <param name="path" value="${rep.home}/repository/index"/>
+        <param name="supportHighlighting" value="true"/>
+    </SearchIndex>
+</Repository>

Modified: james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml?rev=925857&r1=925856&r2=925857&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml (original)
+++ james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml Sun Mar 21 18:35:16 2010
@@ -330,6 +330,27 @@
         <constructor-arg index="1" ref="subscriper"/>
         <constructor-arg index="2" ref="entityManagerFactory"/>
     </bean>
+    
+    
+    
+	<!-- JCR implementation of IMAP Storage-->
+	<!--  
+	<bean id ="subscriper" 	class="org.apache.james.imap.jcr.JCRGlobalUserSubscriptionManager">
+      <constructor-arg index="0" ref="jcrRepository"/>
+      <constructor-arg index="1" value="james"/>
+      <constructor-arg index="2" value="james"/>
+      <constructor-arg index="3" value="james"/>
+	</bean>
+	
+	<bean id="mailboxmanager" class="org.apache.james.imap.jcr.JCRGlobalUserMailboxManager">
+      <constructor-arg index="0" ref="authenticator"/>
+      <constructor-arg index="1" ref="subscriper"/>
+      <constructor-arg index="2" ref="jcrRepository"/>
+      <constructor-arg index="3" value="james"/>
+      <constructor-arg index="4" value="james"/>
+      <constructor-arg index="5" value="james"/>
+	</bean>
+    -->
 
 	<bean id="domainlistmanagement" class="org.apache.james.management.impl.DomainListManagement" />
 
@@ -364,5 +385,16 @@
         <property name="showSql" value="false"/>
     </bean>
     
+    
+    
+    <!-- Jackrabbit JCR Repository -->
+    <bean id="jcrRepository" class="org.apache.jackrabbit.core.RepositoryImpl">
+        <constructor-arg index="0" ref="config" />
+    </bean>
+    <bean id="config" class="org.apache.jackrabbit.core.config.RepositoryConfig" factory-method="create">        
+        <constructor-arg index="0" value="../conf/jcr-repository.xml"/>
+        <constructor-arg index="1" value="../var/jackrabbit" />
+    </bean>
+    
     <!--  #################################################################### -->
 </beans>
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org