james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject svn commit: r1685944 - in /james/mailbox/trunk: cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml spring/src/main/resources/META-INF/spring/spring-mailbox.xml
Date Wed, 17 Jun 2015 08:38:53 GMT
Author: btellier
Date: Wed Jun 17 08:38:53 2015
New Revision: 1685944

URL: http://svn.apache.org/r1685944
Log:
MAILBOX-237 Add cassandra mailbox to exposed Spring, contributed by Antoine Duprat

Modified:
    james/mailbox/trunk/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml
    james/mailbox/trunk/spring/src/main/resources/META-INF/spring/spring-mailbox.xml

Modified: james/mailbox/trunk/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml?rev=1685944&r1=1685943&r2=1685944&view=diff
==============================================================================
--- james/mailbox/trunk/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml
(original)
+++ james/mailbox/trunk/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml
Wed Jun 17 08:38:53 2015
@@ -18,7 +18,7 @@
   under the License.    
 -->
 
-<beans xmlns="http://www.springframework.org/schema/beans" 
+<beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
@@ -52,6 +52,11 @@
 
     <alias name="jvm-locker" alias="cassandra-locker"/>
 
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+        <property name="ignoreUnresolvablePlaceholders" value="true"/>
+        <property name ="location" value="classpath:cassandra.properties"/>
+    </bean>
+
     <!--
       The Cluster factory is responsible for connecting the cluster
 
@@ -60,21 +65,19 @@
       The SessionFactory is responsible for giving a session we can work with
     -->
     <bean id="cassandra-cluster" class="org.apache.james.mailbox.cassandra.ClusterFactory"
factory-method="createClusterForSingleServerWithoutPassWord">
-        <constructor-arg index="0" value="localhost"/>
-        <constructor-arg index="1" value="9042" type="int"/>
+        <constructor-arg index="0" value="${cassandra.ip}"/>
+        <constructor-arg index="1" value="${cassandra.port}" type="int"/>
     </bean>
 
     <bean id="cassandra-cluster-initialized" class="org.apache.james.mailbox.cassandra.ClusterWithKeyspaceCreatedFactory"
factory-method="clusterWithInitializedKeyspace">
         <constructor-arg index="0" ref="cassandra-cluster"/>
-        <constructor-arg index="1" value="apache_james"/>
-        <constructor-arg index="2" value="1" type="int"/>
+        <constructor-arg index="1" value="${cassandra.keyspace}"/>
+        <constructor-arg index="2" value="${cassandra.replication.factor}" type="int"/>
     </bean>
 
     <bean id="cassandra-session" class="org.apache.james.mailbox.cassandra.SessionFactory"
factory-method="">
         <constructor-arg index="0" ref="cassandra-cluster-initialized"/>
-        <constructor-arg index="1" value="apache_james"/>
+        <constructor-arg index="1" value="${cassandra.keyspace}"/>
     </bean>
 
-
-
 </beans>

Modified: james/mailbox/trunk/spring/src/main/resources/META-INF/spring/spring-mailbox.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/spring/src/main/resources/META-INF/spring/spring-mailbox.xml?rev=1685944&r1=1685943&r2=1685944&view=diff
==============================================================================
--- james/mailbox/trunk/spring/src/main/resources/META-INF/spring/spring-mailbox.xml (original)
+++ james/mailbox/trunk/spring/src/main/resources/META-INF/spring/spring-mailbox.xml Wed Jun
17 08:38:53 2015
@@ -33,7 +33,7 @@
 
     <!-- TODO: update spring context creation to match new Jackrabbit version -->
     <!--<import resource="classpath:META-INF/spring/mailbox-jcr.xml" />-->
-
+    
     <import resource="classpath:META-INF/spring/mailbox-maildir.xml"/>
     <import resource="classpath:META-INF/spring/mailbox-memory.xml"/>
     <!-- TODO: Fix hbase build and re-enable -->
@@ -53,4 +53,8 @@
      -->
     <bean id="groupMembershipResolver" class="org.apache.james.mailbox.acl.SimpleGroupMembershipResolver"/>
 
+
+    <beans profile="cassandra">
+        <import resource="classpath:META-INF/spring/mailbox-cassandra.xml"/>
+    </beans>
 </beans>



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


Mime
View raw message