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 er...@apache.org on 2010/11/05 10:38:25 UTC
svn commit: r1031494 -
/james/server/trunk/container-spring/src/main/config/examples/spring-beans.xml
Author: eric
Date: Fri Nov 5 09:38:25 2010
New Revision: 1031494
URL: http://svn.apache.org/viewvc?rev=1031494&view=rev
Log:
Impact beans definitions in examples further to JAMES-1115 and JAMES-1116.
Modified:
james/server/trunk/container-spring/src/main/config/examples/spring-beans.xml
Modified: james/server/trunk/container-spring/src/main/config/examples/spring-beans.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/config/examples/spring-beans.xml?rev=1031494&r1=1031493&r2=1031494&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/config/examples/spring-beans.xml (original)
+++ james/server/trunk/container-spring/src/main/config/examples/spring-beans.xml Fri Nov 5 09:38:25 2010
@@ -24,8 +24,8 @@
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring-2.5.0.xsd
+ http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd">
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
@@ -128,33 +128,45 @@
<!-- Change trace to true for debugging purposes -->
<camel:camelContext id="jamesCamelContext" trace="false" >
- <camel:jmxAgent id="agent" disabled="false" createConnector="true" serviceUrlPath="/jmxrmi/jamescamel"/>
+ <camel:jmxAgent id="agent" disabled="false" createConnector="false" serviceUrlPath="/jmxrmi/jamescamel"/>
<camel:template id="producerTemplate"/>
</camel:camelContext>
+
+
<!-- lets create an embedded ActiveMQ Broker -->
- <amq:broker useJmx="true" persistent="true" brokerName="james" dataDirectory="filesystem=file://var/activemq-data/" useShutdownHook="false" id="broker">
+ <amq:broker useJmx="true" persistent="true" brokerName="james" dataDirectory="filesystem=file://var/activemq-data/" useShutdownHook="false" schedulerSupport="true" id="broker">
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
<!-- Support priority handling of messages -->
- <!-- This will not work till we use activemq 5.4+ -->
<!-- http://activemq.apache.org/how-can-i-support-priority-queues.html -->
- <!--
<amq:policyEntry queue=">" prioritizedMessages="true"/>
- -->
</amq:policyEntries>
</amq:policyMap>
</amq:destinationPolicy>
+ <amq:managementContext>
+ <amq:managementContext createConnector="false"/>
+ </amq:managementContext>
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>
+
+ <amq:connectionFactory id="amqConnectionFactory" brokerURL="vm://james?create=false">
+ <property name="blobTransferPolicy" ref="blobTransferPolicy"/>
+ </amq:connectionFactory>
+
+ <bean id="blobTransferPolicy" class="org.apache.james.queue.activemq.FileSystemBlobTransferPolicy">
+ <property name="defaultUploadUrl" value="file://var/queue"/>
+ </bean>
- <amq:connectionFactory id="amqConnectionFactory" brokerURL="vm://james?create=false" />
-
- <bean id="jmsConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
- <property name="connectionFactory" ref="amqConnectionFactory"/>
+ <!-- IMPORTANT: if you use not the ActiveMQMailQueueFactory you prolly need to set cacheConsumers to false -->
+ <bean id="jmsConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
+ <property name="targetConnectionFactory" ref="amqConnectionFactory"/>
+ <property name="sessionCacheSize" value="10"/>
+ <property name="cacheConsumers" value="true"/>
+ <property name="cacheProducers" value="true"/>
</bean>
<!-- setup spring jms TX manager -->
@@ -162,8 +174,7 @@
<property name="connectionFactory" ref="jmsConnectionFactory"/>
</bean>
- <!-- Use JMSMailQueueFactory till activemq 5.5.0 is released -->
- <bean id="mailQueueFactory" class="org.apache.james.queue.jms.JMSMailQueueFactory" depends-on="broker"/>
+ <bean id="mailQueueFactory" class="org.apache.james.queue.activemq.ActiveMQMailQueueFactory" depends-on="broker"/>
<!-- Build the camelroute from the spoolmanager.xml -->
<bean id="mailProcessor" name="processorRoute" class="org.apache.james.mailetcontainer.camel.CamelMailProcessorList"/>
@@ -291,7 +302,7 @@
<!--
<bean id="sessionMapperFactory" class="org.apache.james.adapter.mailbox.maildir.MaildirMailboxSessionMapperFactoryUtil" factory-method="create">
<constructor-arg index="0" ref="filesystem"/>
- <constructor-arg index="1" ref="James"/>
+ <constructor-arg index="1" ref="mailserver"/>
<constructor-arg index="2" value="file://var/mail/maildir/"/>
</bean>
<bean id ="subscriptionManager" class="org.apache.james.mailbox.maildir.MaildirSubscriptionManager">
@@ -320,7 +331,7 @@
</property>
</bean>
- <bean id="jcrUtils" class="org.apache.james.imap.jcr.JCRUtils"/>
+ <bean id="jcrUtils" class="org.apache.james.mailbox.jcr.JCRUtils"/>
<bean id ="sessionJcrRepository" class="org.apache.james.mailbox.jcr.GlobalMailboxSessionJCRRepository" depends-on="imapCndLoader">
<constructor-arg index="0" ref="jcrRepository"/>
@@ -331,10 +342,6 @@
<bean id="nodeLocker" class="org.apache.james.mailbox.jcr.JCRVmNodeLocker"/>
- <bean id="uidConsumer" class="org.apache.james.mailbox.jcr.JCRUidConsumer">
- <constructor-arg index="0" ref="sessionJcrRepository"/>
- <constructor-arg index="1" ref="nodeLocker"/>
- </bean>
<bean id="sessionMapperFactory" class="org.apache.james.mailbox.jcr.JCRMailboxSessionMapperFactory">
<constructor-arg index="0" ref="sessionJcrRepository"/>
@@ -349,7 +356,6 @@
<constructor-arg index="0" ref="sessionMapperFactory"/>
<constructor-arg index="1" ref="authenticator"/>
<constructor-arg index="2" ref="nodeLocker"/>
- <constructor-arg index="3" ref="uidConsumer"/>
</bean>
-->
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org