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/01 10:14:06 UTC
svn commit: r917427 - in /james/server/trunk: pom.xml
spring-deployment/pom.xml
spring-deployment/src/main/config/james/activemq.xml
spring-deployment/src/main/config/james/log4j.properties
spring-deployment/src/main/config/james/spring-beans.xml
Author: norman
Date: Mon Mar 1 09:14:04 2010
New Revision: 917427
URL: http://svn.apache.org/viewvc?rev=917427&view=rev
Log:
Forgot to commit .xml files before.. sigh (JAMES-976)
Added:
james/server/trunk/spring-deployment/src/main/config/james/activemq.xml
Modified:
james/server/trunk/pom.xml
james/server/trunk/spring-deployment/pom.xml
james/server/trunk/spring-deployment/src/main/config/james/log4j.properties
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=917427&r1=917426&r2=917427&view=diff
==============================================================================
--- james/server/trunk/pom.xml (original)
+++ james/server/trunk/pom.xml Mon Mar 1 09:14:04 2010
@@ -927,7 +927,13 @@
<artifactId>activemq-core</artifactId>
<version>5.3.0</version>
</dependency>
-
+ <dependency>
+ <groupId>org.jencks</groupId>
+ <artifactId>jencks-amqpool</artifactId>
+ <version>2.2</version>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
@@ -993,6 +999,18 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jms</artifactId>
+ <version>3.0.0.RELEASE</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>3.0.0.RELEASE</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.3.0</version>
@@ -1036,6 +1054,52 @@
<artifactId>camel-spring</artifactId>
<version>2.1.0</version>
<scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jms</artifactId>
+ <version>2.1.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-camel</artifactId>
+ <version>5.3.0</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>jersey-spring</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-ruby</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-web</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>xbean-spring</artifactId>
+ <version>3.6</version>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
Modified: james/server/trunk/spring-deployment/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/pom.xml?rev=917427&r1=917426&r2=917427&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/pom.xml (original)
+++ james/server/trunk/spring-deployment/pom.xml Mon Mar 1 09:14:04 2010
@@ -215,10 +215,30 @@
<scope>runtime</scope>
</dependency>
<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jms</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-camel</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jencks</groupId>
+ <artifactId>jencks-amqpool</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>xbean-spring</artifactId>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.springframework</groupId>
Added: james/server/trunk/spring-deployment/src/main/config/james/activemq.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/config/james/activemq.xml?rev=917427&view=auto
==============================================================================
--- james/server/trunk/spring-deployment/src/main/config/james/activemq.xml (added)
+++ james/server/trunk/spring-deployment/src/main/config/james/activemq.xml Mon Mar 1 09:14:04 2010
@@ -0,0 +1,144 @@
+<!--
+ 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.
+-->
+<beans
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:amq="http://activemq.apache.org/schema/core"
+ 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-2.0.xsd
+ http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
+
+ <!-- Allows us to use system properties as variables in this configuration file -->
+ <!--
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <value>file:${activemq.base}/conf/credentials.properties</value>
+ </property>
+ </bean>
+ -->
+
+ <!--
+ The <broker> element is used to configure the ActiveMQ broker.
+ -->
+ <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="../data">
+
+
+ <!--
+ For better performances use VM cursor and small memory limit.
+ For more information, see:
+
+ http://activemq.apache.org/message-cursors.html
+
+ Also, if your producer is "hanging", it's probably due to producer flow control.
+ For more information, see:
+ http://activemq.apache.org/producer-flow-control.html
+ -->
+
+ <destinationPolicy>
+ <policyMap>
+ <policyEntries>
+ <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
+ <pendingSubscriberPolicy>
+ <vmCursor />
+ </pendingSubscriberPolicy>
+ </policyEntry>
+ <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
+ <!-- Use VM cursor for better latency
+ For more information, see:
+
+ http://activemq.apache.org/message-cursors.html
+ -->
+ <pendingQueuePolicy>
+ <vmQueueCursor/>
+ </pendingQueuePolicy>
+ </policyEntry>
+ </policyEntries>
+ </policyMap>
+ </destinationPolicy>
+
+ <!--
+ The managementContext is used to configure how ActiveMQ is exposed in
+ JMX. By default, ActiveMQ uses the MBean server that is started by
+ the JVM. For more information, see:
+
+ http://activemq.apache.org/jmx.html
+ -->
+ <managementContext>
+ <managementContext createConnector="false"/>
+ </managementContext>
+
+ <!--
+ Configure message persistence for the broker. The default persistence
+ mechanism is the KahaDB store (identified by the kahaDB tag).
+ For more information, see:
+
+ http://activemq.apache.org/persistence.html
+ -->
+ <persistenceAdapter>
+ <kahaDB directory="../data/kahadb"/>
+ </persistenceAdapter>
+
+
+
+
+ <!--
+ The systemUsage controls the maximum amount of space the broker will
+ use before slowing down producers. For more information, see:
+
+ http://activemq.apache.org/producer-flow-control.html
+
+ <systemUsage>
+ <systemUsage>
+ <memoryUsage>
+ <memoryUsage limit="20 mb"/>
+ </memoryUsage>
+ <storeUsage>
+ <storeUsage limit="1 gb" name="foo"/>
+ </storeUsage>
+ <tempUsage>
+ <tempUsage limit="100 mb"/>
+ </tempUsage>
+ </systemUsage>
+ </systemUsage>
+ -->
+
+ <!--
+ The transport connectors expose ActiveMQ over a given protocol to
+ clients and other brokers. For more information, see:
+
+ http://activemq.apache.org/configuring-transports.html
+ -->
+ <transportConnectors>
+ <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+ </transportConnectors>
+
+ </broker>
+
+ <!--
+ Uncomment to enable Camel
+ Take a look at activemq-camel.xml for more details
+
+ <import resource="camel.xml"/>
+ -->
+
+ <!--
+ Enable web consoles, REST and Ajax APIs and demos
+ Take a look at activemq-jetty.xml for more details
+ -->
+ <!--
+ <import resource="jetty.xml"/>
+ -->
+</beans>
Modified: james/server/trunk/spring-deployment/src/main/config/james/log4j.properties
URL: http://svn.apache.org/viewvc/james/server/trunk/spring-deployment/src/main/config/james/log4j.properties?rev=917427&r1=917426&r2=917427&view=diff
==============================================================================
--- james/server/trunk/spring-deployment/src/main/config/james/log4j.properties (original)
+++ james/server/trunk/spring-deployment/src/main/config/james/log4j.properties Mon Mar 1 09:14:04 2010
@@ -129,6 +129,10 @@
+# logger for activemq
+log4j.logger.org.apache.xbean.spring=INFO, CONS, FILE
+log4j.logger.org.apache.activemq=INFO, CONS, FILE
+
# logger for camel
log4j.logger.org.apache.camel=WARN, CONS, FILE
log4j.logger.org.springframework=WARN, CONS, FILE
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=917427&r1=917426&r2=917427&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 Mon Mar 1 09:14:04 2010
@@ -115,17 +115,41 @@
<!-- Add support for Persistence annotations -->
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
- <!-- Change trace to true for debugging purposes -->
- <camelContext id="jamesCamelContext" xmlns="http://camel.apache.org/schema/spring" trace="false">
- <routeBuilder ref="processorRoute" />
- </camelContext>
-
- <!-- Build the camelroute from the spoolmanager.xml -->
- <bean id="spoolmanager" name="processorRoute" class="org.apache.james.transport.camel.MailProcessorRouteBuilder"/>
-
- <!-- The component for the spool which handles consuming and producing -->
- <bean id="spool" class="org.apache.james.transport.camel.SpoolComponent" />
+ <!-- Change trace to true for debugging purposes -->
+ <camel:camelContext id="jamesCamelContext" trace="false" >
+ <camel:template id="producerTemplate"/>
+ <camel:routeBuilder ref="processorRoute" />
+ </camel:camelContext>
+
+ <!-- Build the camelroute from the spoolmanager.xml -->
+ <bean id="spoolmanager" name="processorRoute" class="org.apache.james.transport.camel.MailProcessorRouteBuilder"/>
+
+
+
+ <!-- jms connection pooling -->
+ <bean id="jmsConnectionFactory" class="org.jencks.amqpool.PooledConnectionFactory">
+ <constructor-arg value="vm://localhost?broker.useJmx=false" />
+ <property name="maxConnections" value="8" />
+ </bean>
+
+
+ <!-- setup spring jms TX manager -->
+ <bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
+ <property name="connectionFactory" ref="jmsConnectionFactory"/>
+ </bean>
+
+ <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" depends-on="broker">
+ <property name="connectionFactory" ref="jmsConnectionFactory"/>
+ <property name="transacted" value="true"/>
+ <property name="transactionManager" ref="jmsTransactionManager"/>
+ </bean>
+
+ <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
+ <property name="config" value="classpath:activemq.xml" />
+ <property name="start" value="true" />
+ </bean>
+
<bean id="James" class="org.apache.james.James"/>
<bean id="mailetcontext" class="org.apache.james.JamesMailetContext"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org