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/24 19:54:30 UTC
svn commit: r1026846 - in /james/server/trunk: ./ container-spring/
container-spring/src/assemble/ container-spring/src/main/config/james/
Author: norman
Date: Sun Oct 24 17:54:30 2010
New Revision: 1026846
URL: http://svn.apache.org/viewvc?rev=1026846&view=rev
Log:
Enable JMX by default (JAMES-1083)
Added:
james/server/trunk/container-spring/src/main/config/james/jmx.access
james/server/trunk/container-spring/src/main/config/james/jmx.password
Modified:
james/server/trunk/container-spring/pom.xml
james/server/trunk/container-spring/src/assemble/bin.xml
james/server/trunk/container-spring/src/main/config/james/spring-beans.xml
james/server/trunk/pom.xml
Modified: james/server/trunk/container-spring/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/pom.xml?rev=1026846&r1=1026845&r2=1026846&view=diff
==============================================================================
--- james/server/trunk/container-spring/pom.xml (original)
+++ james/server/trunk/container-spring/pom.xml Sun Oct 24 17:54:30 2010
@@ -52,7 +52,7 @@
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
<environmentSetupFileName>setenv</environmentSetupFileName>
<!-- set some sane defaults for memory -->
- <extraJvmArguments>-Xms128m -Xmx512m -Djava.system.class.loader=org.apache.james.container.spring.JamesClassLoader ${javamail.system-properties}</extraJvmArguments>
+ <extraJvmArguments>-Xms128m -Xmx512m -Djava.system.class.loader=org.apache.james.container.spring.JamesClassLoader ${jmx.system-properties} ${javamail.system-properties}</extraJvmArguments>
<!-- Generate bin scripts for windows and unix per default -->
<platforms>
<platform>windows</platform>
@@ -134,12 +134,17 @@
</property>
<property>
<name>wrapper.java.additional.1</name>
- <value>-Djava.system.class.loader=org.apache.james.container.spring.JamesClassLoader</value>
+ <value>-Djava.system.class.loader=org.apache.james.container.spring.JamesClassLoader -Dcom.sun.management.config.file=../conf/jmxremote.password -Dcom.sun.management.jmxremote.port=9999</value>
</property>
<property>
<name>wrapper.java.additional.2</name>
+ <value>${jmx.system-properties}</value>
+ </property>
+ <property>
+ <name>wrapper.java.additional.3</name>
<value>${javamail.system-properties}</value>
</property>
+
</configuration>
</generatorConfiguration>
</generatorConfigurations>
Modified: james/server/trunk/container-spring/src/assemble/bin.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/assemble/bin.xml?rev=1026846&r1=1026845&r2=1026846&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/assemble/bin.xml (original)
+++ james/server/trunk/container-spring/src/assemble/bin.xml Sun Oct 24 17:54:30 2010
@@ -40,6 +40,8 @@
<fileSet>
<directory>src/main/config/james</directory>
<outputDirectory>conf</outputDirectory>
+ <!-- set some sane security defaults for config files -->
+ <fileMode>0600</fileMode>
</fileSet>
<!-- create empty folders by copy a .dummy file -->
@@ -112,6 +114,8 @@
<fileSet>
<directory>target/appassembler/jsw/james/conf</directory>
<outputDirectory>conf</outputDirectory>
+ <!-- set some sane security defaults for config files -->
+ <fileMode>0600</fileMode>
</fileSet>
<fileSet>
<directory>target/appassembler/jsw/james/bin</directory>
Added: james/server/trunk/container-spring/src/main/config/james/jmx.access
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/config/james/jmx.access?rev=1026846&view=auto
==============================================================================
--- james/server/trunk/container-spring/src/main/config/james/jmx.access (added)
+++ james/server/trunk/container-spring/src/main/config/james/jmx.access Sun Oct 24 17:54:30 2010
@@ -0,0 +1,2 @@
+# root user has readwrite access
+root readwrite
\ No newline at end of file
Added: james/server/trunk/container-spring/src/main/config/james/jmx.password
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/config/james/jmx.password?rev=1026846&view=auto
==============================================================================
--- james/server/trunk/container-spring/src/main/config/james/jmx.password (added)
+++ james/server/trunk/container-spring/src/main/config/james/jmx.password Sun Oct 24 17:54:30 2010
@@ -0,0 +1,2 @@
+# user root with password root. This should be changed!
+root root
\ No newline at end of file
Modified: james/server/trunk/container-spring/src/main/config/james/spring-beans.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/config/james/spring-beans.xml?rev=1026846&r1=1026845&r2=1026846&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/config/james/spring-beans.xml (original)
+++ james/server/trunk/container-spring/src/main/config/james/spring-beans.xml Sun Oct 24 17:54:30 2010
@@ -27,10 +27,6 @@
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">
- <!--
- ** JMX part ** to enable exposure of JMX, activate the following beans
- -->
- <!--
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
<map>
@@ -56,15 +52,6 @@
<bean id="mbeanserver" class="org.springframework.jmx.support.MBeanServerFactoryBean" >
<property name="locateExistingServerIfPossible" value="true"/>
</bean>
-
- <bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
- <property name="port" value="1099" />
- </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://localhost/jndi/rmi://localhost:1099/jamesmailserver" />
- </bean>
<bean id="processormanagement" class="org.apache.james.mailetcontainer.lib.ProcessorManagement"/>
@@ -73,7 +60,6 @@
<bean id="virtualusertablemanagement" class="org.apache.james.vut.lib.VirtualUserTableManagement" />
<bean id="domainlistmanagement" class="org.apache.james.domainlist.lib.DomainListManagement" />
- -->
<bean class="org.apache.james.container.spring.lifecycle.CommonsConfigurableBeanPostProcessor">
<property name="configurationProvider" ref="configurationProvider" />
@@ -135,12 +121,12 @@
<!-- Change trace to true for debugging purposes -->
<camel:camelContext id="jamesCamelContext" trace="false" >
- <camel:jmxAgent id="agent" disabled="true"/>
+ <camel:jmxAgent id="agent" disabled="false"/>
<camel:template id="producerTemplate"/>
</camel:camelContext>
<!-- lets create an embedded ActiveMQ Broker -->
- <amq:broker useJmx="false" 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" id="broker">
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
Modified: james/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/pom.xml?rev=1026846&r1=1026845&r2=1026846&view=diff
==============================================================================
--- james/server/trunk/pom.xml (original)
+++ james/server/trunk/pom.xml Sun Oct 24 17:54:30 2010
@@ -1166,6 +1166,12 @@
-Dmail.mime.decodeparameters=true
-Dmail.mime.address.strict=false
</javamail.system-properties>
+ <jmx.system-properties>
+ -Dcom.sun.management.jmxremote.ssl=false
+ -Dcom.sun.management.jmxremote.access.file=../conf/jmx.access
+ -Dcom.sun.management.jmxremote.password.file=../conf/jmx.password
+ -Dcom.sun.management.jmxremote.port=9999
+ </jmx.system-properties>
</properties>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org