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/06 14:03:38 UTC
svn commit: r1032034 - in
/james/server/trunk/container-spring/src/main/config/examples:
smtpserver.xml spring-beans.xml
Author: eric
Date: Sat Nov 6 13:03:38 2010
New Revision: 1032034
URL: http://svn.apache.org/viewvc?rev=1032034&view=rev
Log:
Update examples conf files with latest changes for jmx and smtp hooks.
Modified:
james/server/trunk/container-spring/src/main/config/examples/smtpserver.xml
james/server/trunk/container-spring/src/main/config/examples/spring-beans.xml
Modified: james/server/trunk/container-spring/src/main/config/examples/smtpserver.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/config/examples/smtpserver.xml?rev=1032034&r1=1032033&r2=1032034&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/config/examples/smtpserver.xml (original)
+++ james/server/trunk/container-spring/src/main/config/examples/smtpserver.xml Sat Nov 6 13:03:38 2010
@@ -257,6 +257,24 @@
<!-- Load the core command handlers -->
<handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
+ <!-- This handler can add a hint to the mail which tells the MailQueue which email should get processed first -->
+ <!-- Normally the MailQueue will just handles Mails in FIFO manner -->
+ <!-- Valid priority values are 1,5,9 where 9 is the highest-->
+ <!--
+ <handler class="org.apache.james.smtpserver.MailPriortyHandler">
+ <priorityEntries>
+ <priorityEntry>
+ <domain> yourdomain1 </domain>
+ <priority> 1 </priority>
+ </priorityEntry>
+ <priorityEntry>
+ <domain> yourdomain2 </domain>
+ <priority> 9 </priority>
+ </priorityEntry>
+ <priorityEntries>
+ </handler>
+ -->
+
<!-- This MessageHandler could be used to check message against spamd before -->
<!-- accept the email. So its possible to reject a message on smtplevel if a -->
<!-- configured hits amount is reached. -->
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=1032034&r1=1032033&r2=1032034&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 Sat Nov 6 13:03:38 2010
@@ -26,7 +26,34 @@
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-2.5.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd">
-
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
+ <property name="location" value="file://conf/jmx.properties"/>
+ </bean>
+
+ <!-- Make sure we can bind jmx sockets to a specific ipaddress -->
+ <!-- https://issues.apache.org/jira/browse/JAMES-1104 -->
+ <bean id="restrictedRmiSocketFactory" class="org.apache.james.container.spring.RestrictingRMISocketFactory">
+ <constructor-arg value="${jmx.address}"/>
+ </bean>
+
+ <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
+ <property name="port" value="${jmx.port}" />
+ <property name="serverSocketFactory" ref="restrictedRmiSocketFactory"/>
+ <property name="clientSocketFactory" ref="restrictedRmiSocketFactory"/>
+ </bean>
+
+ <bean id="mbeanserver" class="org.springframework.jmx.support.MBeanServerFactoryBean" >
+ <property name="locateExistingServerIfPossible" value="true"/>
+ <property name="registerWithFactory" value="true"/>
+ </bean>
+
+ <bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry">
+ <property name="objectName" value="connector:name=rmi" />
+ <property name="serviceUrl" value="service:jmx:rmi://${jmx.address}/jndi/rmi://${jmx.address}:${jmx.port}/jmxrmi" />
+ </bean>
+
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
<map>
@@ -51,10 +78,6 @@
</bean>
</property>
</bean>
-
- <bean id="mbeanserver" class="org.springframework.jmx.support.MBeanServerFactoryBean" >
- <property name="locateExistingServerIfPossible" value="true"/>
- </bean>
<bean id="processormanagement" class="org.apache.james.mailetcontainer.lib.ProcessorManagement"/>
@@ -93,6 +116,7 @@
</bean>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name = "location" value="file://conf/database.properties"/>
</bean>
@@ -134,8 +158,9 @@
- <!-- lets create an embedded ActiveMQ Broker -->
- <amq:broker useJmx="true" persistent="true" brokerName="james" dataDirectory="filesystem=file://var/activemq-data/" useShutdownHook="false" schedulerSupport="true" id="broker">
+ <!-- lets create an embedded ActiveMQ Broker -->
+ <!-- disable schedulerSupport for workaround AMQ-2935-->
+ <amq:broker useJmx="true" persistent="true" brokerName="james" dataDirectory="filesystem=file://var/activemq-data/" useShutdownHook="false" schedulerSupport="false" id="broker">
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
@@ -148,6 +173,10 @@
<amq:managementContext>
<amq:managementContext createConnector="false"/>
</amq:managementContext>
+ <!-- use amq persistence adapter for workaround AMQ-2935-->
+ <amq:persistenceAdapter>
+ <amq:amqPersistenceAdapter/>
+ </amq:persistenceAdapter>
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
@@ -165,7 +194,11 @@
<bean id="jmsConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
<property name="targetConnectionFactory" ref="amqConnectionFactory"/>
<property name="sessionCacheSize" value="10"/>
- <property name="cacheConsumers" value="true"/>
+ <!-- Don't cache consumers as we need to use message selectors for delayed messages -->
+ <!-- When caching consumers the selector will not work. -->
+ <!-- This is needed because we can not make use of the scheduler. Thats only a workaround till activemq 5.4.2 was released -->
+ <!-- See AMQ-2935 -->
+ <property name="cacheConsumers" value="false"/>
<property name="cacheProducers" value="true"/>
</bean>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org