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 2009/10/23 11:23:56 UTC
svn commit: r828969 - in /james/server/trunk: ./ phoenix-deployment/
phoenix-deployment/src/conf/ smtpserver-function/
smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/
smtpserver-function/src/main/resources/org/apache/james/smtpserve...
Author: norman
Date: Fri Oct 23 09:23:52 2009
New Revision: 828969
URL: http://svn.apache.org/viewvc?rev=828969&view=rev
Log:
The AsyncSMTPServer is now finally usable in the phoenix deployment ..
Added:
james/server/trunk/smtpserver-function/src/main/resources/org/apache/james/smtpserver/mina/
james/server/trunk/smtpserver-function/src/main/resources/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.xinfo
Modified:
james/server/trunk/include.properties
james/server/trunk/phoenix-deployment/build.xml
james/server/trunk/phoenix-deployment/src/conf/james-assembly.xml
james/server/trunk/pom.xml
james/server/trunk/smtpserver-function/pom.xml
james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.java
james/server/trunk/stage/pom.xml
Modified: james/server/trunk/include.properties
URL: http://svn.apache.org/viewvc/james/server/trunk/include.properties?rev=828969&r1=828968&r2=828969&view=diff
==============================================================================
--- james/server/trunk/include.properties (original)
+++ james/server/trunk/include.properties Fri Oct 23 09:23:52 2009
@@ -112,6 +112,7 @@
path.lib.mina=org.apache.mina/jars
path.lib.guice=com.google.code.guice/jars
path.lib.guiceyfruit=org.guiceyfruit/jars
+path.lib.springaopalliance=spring-aopalliance/jars
# ----- Spring -----
jarname.spring.jar=spring-2.0.jar
@@ -347,8 +348,12 @@
# Memory only database
h2.jar=${path.lib.h2}/h2-1.1.102.jar
lucene.jar=${path.lib.lucene}/lucene-core-2.2.0.jar
-slf4j-api.jar=${path.lib.slf4j}/slf4j-api-1.3.0.jar
-slf4j-log4j.jar=${path.lib.slf4j}/slf4j-log4j12-1.3.0.jar
+
+slf4j-api.jar=${path.lib.slf4j}/${jarname.slf4j-api.jar}
+jarname.slf4j-api.jar=slf4j-api-1.3.0.jar
+
+slf4j-log4j.jar=${path.lib.slf4j}/${jarname.slf4j-log4j.jar}
+jarname.slf4j-log4j.jar=slf4j-log4j12-1.3.0.jar
# ------ JPA --------------------------
@@ -370,6 +375,10 @@
jarname.guiceyfruit-core.jar=guiceyfruit-core-2.0.jar
guiceyfruit-core.jar=${path.lib.guiceyfruit}/${jarname.guiceyfruit-core.jar}
+jarname.spring-aopalliance.jar=spring-aopalliance-1.0.jar
+spring-aopalliance.jar=${path.lib.springaopalliance}/${jarname.spring-aopalliance.jar}
+
+
# --------------------------------------------------
# TEST LIBRARIES
# --------------------------------------------------
Modified: james/server/trunk/phoenix-deployment/build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-deployment/build.xml?rev=828969&r1=828968&r2=828969&view=diff
==============================================================================
--- james/server/trunk/phoenix-deployment/build.xml (original)
+++ james/server/trunk/phoenix-deployment/build.xml Fri Oct 23 09:23:52 2009
@@ -555,6 +555,15 @@
<lib dir="${lib.dir}/${path.lib.commonsdbcp}" includes="${jarname.commons-dbcp.jar}" />
<lib dir="${lib.dir}/${path.lib.commonspool}" includes="${jarname.commons-pool.jar}" />
<lib dir="${lib.dir}/${path.lib.commonsjxpath}" includes="${jarname.commons-jxpath.jar}" />
+ <lib dir="${lib.dir}/${path.lib.commonscodec}" includes="${jarname.commons-codec.jar}" />
+ <lib dir="${lib.dir}/${path.lib.guice}" includes="${jarname.guice.jar}" />
+ <lib dir="${lib.dir}/${path.lib.guiceyfruit}" includes="${jarname.guiceyfruit-core.jar}" />
+ <lib dir="${lib.dir}/${path.lib.springaopalliance}" includes="${jarname.spring-aopalliance.jar}" />
+ <lib dir="${lib.dir}/${path.lib.mina}" includes="${jarname.mina-core.jar}" />
+ <lib dir="${lib.dir}/${path.lib.slf4j}" includes="${jarname.slf4j-api.jar}" />
+ <lib dir="${lib.dir}/${path.lib.slf4j}" includes="${jarname.slf4j-log4j.jar}" />
+ <lib dir="${lib.dir}/${path.lib.log4j}" includes="${jarname.log4j.jar}" />
+
<lib dir="${lib.dir}/${path.lib.excaliburthread}" includes="${jarname.excalibur-thread-api.jar}" />
<lib dir="${lib.dir}/${path.lib.excaliburthread}" includes="${jarname.excalibur-thread-impl.jar}" />
<lib dir="${lib.dir}/${path.lib.excaliburpool}" includes="${jarname.excalibur-pool-api.jar}" />
Modified: james/server/trunk/phoenix-deployment/src/conf/james-assembly.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/phoenix-deployment/src/conf/james-assembly.xml?rev=828969&r1=828968&r2=828969&view=diff
==============================================================================
--- james/server/trunk/phoenix-deployment/src/conf/james-assembly.xml (original)
+++ james/server/trunk/phoenix-deployment/src/conf/james-assembly.xml Fri Oct 23 09:23:52 2009
@@ -152,13 +152,31 @@
<provide name="James" role="org.apache.james.services.MailServer"/>
<provide name="thread-manager"
role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
+ <provide name="database-connections"213
+ role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector" />
+ <provide name="filesystem" role="org.apache.james.services.FileSystem" />
+ <provide name="defaultvirtualusertable"
+ role="org.apache.james.api.vut.VirtualUserTable" />
+ <proxy disable='true'/>
+ </block>
+
+ <!-- Async SMTP Server -->
+ <!-- enable this to use the MINA based SMTP Server which uses NIO -->
+ <!--
+ <block name="smtpserver" class="org.apache.james.smtpserver.mina.AvalonAsyncSMTPServer" >
+ <provide name="James" role="org.apache.mailet.MailetContext"/>
+ <provide name="localusersrepository" role="org.apache.james.api.user.UsersRepository"/>
+ <provide name="dnsserver" role="org.apache.james.api.dnsservice.DNSService"/>
+ <provide name="James" role="org.apache.james.services.MailServer"/>
<provide name="database-connections"
role="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector" />
<provide name="filesystem" role="org.apache.james.services.FileSystem" />
<provide name="defaultvirtualusertable"
role="org.apache.james.api.vut.VirtualUserTable" />
+ <provide name="virtualusertable-store" role="org.apache.james.api.vut.VirtualUserTableStore"/>
<proxy disable='true'/>
</block>
+ -->
<!-- NNTP Server -->
<block name="nntpserver" class="org.apache.james.nntpserver.NNTPServer" >
Modified: james/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/pom.xml?rev=828969&r1=828968&r2=828969&view=diff
==============================================================================
--- james/server/trunk/pom.xml (original)
+++ james/server/trunk/pom.xml Fri Oct 23 09:23:52 2009
@@ -1129,6 +1129,12 @@
<artifactId>guiceyfruit-core</artifactId>
<version>2.0</version>
</dependency>
+ <dependency>
+ <groupId>spring-aopalliance</groupId>
+ <artifactId>spring-aopalliance</artifactId>
+ <version>1.0</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
</dependencyManagement>
Modified: james/server/trunk/smtpserver-function/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/pom.xml?rev=828969&r1=828968&r2=828969&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/pom.xml (original)
+++ james/server/trunk/smtpserver-function/pom.xml Fri Oct 23 09:23:52 2009
@@ -149,6 +149,11 @@
<artifactId>guiceyfruit-core</artifactId>
</dependency>
<dependency>
+ <groupId>spring-aopalliance</groupId>
+ <artifactId>spring-aopalliance</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.james</groupId>
<artifactId>james-server-core-library</artifactId>
<type>test-jar</type>
Modified: james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.java?rev=828969&r1=828968&r2=828969&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.java (original)
+++ james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.java Fri Oct 23 09:23:52 2009
@@ -36,6 +36,7 @@
import org.apache.james.api.vut.VirtualUserTableStore;
import org.apache.james.services.FileSystem;
import org.apache.james.services.MailServer;
+import org.apache.james.smtpserver.protocol.SMTPServerMBean;
import org.apache.james.socket.configuration.JamesConfiguration;
import org.apache.mailet.MailetContext;
import org.guiceyfruit.jsr250.Jsr250Module;
@@ -52,8 +53,9 @@
* of AsyncSMTPServer. This way AsyncSMTPServer has no dependencies on avalon anymore
*
*/
-public class AvalonAsyncSMTPServer implements LogEnabled, Configurable, Serviceable, Initializable, GuiceInjected {
+public class AvalonAsyncSMTPServer implements LogEnabled, Configurable, Serviceable, Initializable, GuiceInjected,SMTPServerMBean {
+ private AsyncSMTPServer smtpserver;
private FileSystem filesystem;
private MailServer mailserver;
private DNSService dns;
@@ -94,7 +96,7 @@
*/
public void initialize() throws Exception {
injector = Guice.createInjector(new SMTPServerModule(), new Jsr250Module());
- injector.getInstance(AsyncSMTPServer.class);
+ smtpserver = injector.getInstance(AsyncSMTPServer.class);
}
/**
@@ -163,4 +165,32 @@
}
}
+
+ /**
+ * @see org.apache.james.smtpserver.protocol.SMTPServerMBean#getNetworkInterface()
+ */
+ public String getNetworkInterface() {
+ return smtpserver.getNetworkInterface();
+ }
+
+ /**
+ * @see org.apache.james.smtpserver.protocol.SMTPServerMBean#getPort()
+ */
+ public int getPort() {
+ return smtpserver.getPort();
+ }
+
+ /**
+ * @see org.apache.james.smtpserver.protocol.SMTPServerMBean#getSocketType()
+ */
+ public String getSocketType() {
+ return smtpserver.getSocketType();
+ }
+
+ /**
+ * @see org.apache.james.smtpserver.protocol.SMTPServerMBean#isEnabled()
+ */
+ public boolean isEnabled() {
+ return smtpserver.isEnabled();
+ }
}
Added: james/server/trunk/smtpserver-function/src/main/resources/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.xinfo
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/resources/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.xinfo?rev=828969&view=auto
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/resources/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.xinfo (added)
+++ james/server/trunk/smtpserver-function/src/main/resources/org/apache/james/smtpserver/mina/AvalonAsyncSMTPServer.xinfo Fri Oct 23 09:23:52 2009
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+ -->
+<blockinfo>
+
+ <!-- section to describe block -->
+ <block>
+ <version>1.0</version>
+ </block>
+
+ <!-- interfaces that may be exported to manange this block -->
+ <management-access-points>
+ <service name="org.apache.james.smtpserver.protocol.SMTPServerMBean"/>
+ </management-access-points>
+
+ <dependencies>
+ <dependency>
+ <service name="org.apache.mailet.MailetContext" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.james.api.user.UsersRepository" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.james.api.dnsservice.DNSService" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.james.services.MailServer" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.james.services.FileSystem" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.james.api.vut.VirtualUserTable" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.james.services.FileSystem" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector" version="1.0"/>
+ </dependency>
+ <dependency>
+ <service name="org.apache.james.api.vut.VirtualUserTableStore" version="1.0"/>
+ </dependency>
+ </dependencies>
+</blockinfo>
Modified: james/server/trunk/stage/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/stage/pom.xml?rev=828969&r1=828968&r2=828969&view=diff
==============================================================================
--- james/server/trunk/stage/pom.xml (original)
+++ james/server/trunk/stage/pom.xml Fri Oct 23 09:23:52 2009
@@ -399,6 +399,11 @@
<groupId>org.guiceyfruit</groupId>
<artifactId>guiceyfruit-core</artifactId>
</dependency>
+ <dependency>
+ <groupId>spring-aopalliance</groupId>
+ <artifactId>spring-aopalliance</artifactId>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org