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/10/07 19:27:23 UTC

svn commit: r1005536 - in /james/server/trunk: queue-api/src/main/java/org/apache/james/queue/ spring-deployment/ spring-deployment/src/main/config/james/ spring-deployment/src/main/java/org/apache/james/container/spring/

Author: norman
Date: Thu Oct  7 17:27:22 2010
New Revision: 1005536

URL: http://svn.apache.org/viewvc?rev=1005536&view=rev
Log:
Remove compile dependency of Jackrabbit from spring deployment. 

Added:
    james/server/trunk/queue-api/src/main/java/org/apache/james/queue/MailQueueMBean.java
    james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/FileSystemUtils.java
Removed:
    james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/FileSystemRepositoryConfigFactory.java
Modified:
    james/server/trunk/spring-deployment/pom.xml
    james/server/trunk/spring-deployment/src/main/config/james/spring-beans.xml

Added: james/server/trunk/queue-api/src/main/java/org/apache/james/queue/MailQueueMBean.java
URL: http://svn.apache.org/viewvc/james/server/trunk/queue-api/src/main/java/org/apache/james/queue/MailQueueMBean.java?rev=1005536&view=auto
==============================================================================
--- james/server/trunk/queue-api/src/main/java/org/apache/james/queue/MailQueueMBean.java (added)
+++ james/server/trunk/queue-api/src/main/java/org/apache/james/queue/MailQueueMBean.java Thu Oct  7 17:27:22 2010
@@ -0,0 +1,20 @@
+package org.apache.james.queue;
+
+public interface MailQueueMBean {
+
+    /**
+     * Return the name of the queue
+     * 
+     * @return queue
+     */
+    public String getName();
+    
+    /**
+     * Return the count of the queued mails
+     * 
+     * @return size
+     */
+    public int getSize();
+    
+    
+}

Modified: james/server/trunk/spring-deployment/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/pom.xml?rev=1005536&r1=1005535&r2=1005536&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/pom.xml (original)
+++ james/server/trunk/spring-deployment/pom.xml Thu Oct  7 17:27:22 2010
@@ -523,7 +523,7 @@
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependency>    
        <dependency>
       <groupId>javax.jcr</groupId>

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=1005536&r1=1005535&r2=1005536&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 Thu Oct  7 17:27:22 2010
@@ -444,10 +444,19 @@
     </bean>
     
     <!-- Jackrabbit config -->
-    <bean id="config" class="org.apache.james.container.spring.FileSystemRepositoryConfigFactory" factory-method="create">        
-        <constructor-arg index="0" value="file://conf/jcr-repository.xml"/>
-        <constructor-arg index="1" value="file://var/jackrabbit" />
-        <constructor-arg index="2" ref="filesystem"/>
+    <bean id="config" class="org.apache.jackrabbit.core.config.RepositoryConfig" factory-method="create">
+        <constructor-arg index="0">
+            <bean class="org.apache.james.container.spring.FileSystemUtils" factory-method="getFileNameFromUrl">
+                <constructor-arg index="0" ref="filesystem"/>
+                <constructor-arg index="1" value="file://conf/jcr-repository.xml" />
+            </bean>
+        </constructor-arg>
+        <constructor-arg index="1">
+            <bean class="org.apache.james.container.spring.FileSystemUtils" factory-method="getFileNameFromUrl">
+                <constructor-arg index="0" ref="filesystem"/>
+                <constructor-arg index="1" value="file://var/jackrabbit" />
+            </bean>
+        </constructor-arg>
     </bean>
 
     <!-- #################################################################### -->

Added: james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/FileSystemUtils.java
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/FileSystemUtils.java?rev=1005536&view=auto
==============================================================================
--- james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/FileSystemUtils.java (added)
+++ james/server/trunk/spring-deployment/src/main/java/org/apache/james/container/spring/FileSystemUtils.java Thu Oct  7 17:27:22 2010
@@ -0,0 +1,42 @@
+/****************************************************************
+ * 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.james.container.spring;
+
+import java.io.FileNotFoundException;
+
+import org.apache.james.services.FileSystem;
+
+/**
+ * Helper class for Spring 
+ *
+ */
+public class FileSystemUtils {
+
+    /**
+     * Return the path for the given url from the {@link FileSystem}
+     * 
+     * @param fs
+     * @param url
+     * @return path
+     * @throws FileNotFoundException
+     */
+    public static String getFileNameFromUrl(FileSystem fs, String url) throws FileNotFoundException {
+        return fs.getFile(url).getAbsolutePath();
+    }
+}



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