Author: norman
Date: Fri Jul 1 06:37:31 2011
New Revision: 1141837
URL: http://svn.apache.org/viewvc?rev=1141837&view=rev
Log:
Allow to configure the server implementation via the configuration admin. See
JAMES-835
Modified:
james/server/trunk/imapserver/src/main/resources/META-INF/spring/imapserver-context.xml
james/server/trunk/lmtpserver/src/main/resources/META-INF/spring/lmtpserver-context.xml
james/server/trunk/pop3server/src/main/resources/META-INF/spring/pop3server-context.xml
james/server/trunk/smtpserver/src/main/resources/META-INF/spring/smtpserver-context.xml
Modified:
james/server/trunk/imapserver/src/main/resources/META-INF/spring/imapserver-context.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/resources/META-INF/spring/imapserver-context.xml?rev=1141837&r1=1141836&r2=1141837&view=diff
==============================================================================
---
james/server/trunk/imapserver/src/main/resources/META-INF/spring/imapserver-context.xml
(original)
+++
james/server/trunk/imapserver/src/main/resources/META-INF/spring/imapserver-context.xml
Fri Jul 1 06:37:31 2011
@@ -17,14 +17,26 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:camel="http://camel.apache.org/schema/spring"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xmlns:ctx="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
<!-- Import PostBeanProcessors -->
<import
resource="classpath*:org/apache/james/container/spring/server-context.xml"/>
+ <!-- Configuration Admin entries so the user can overwrite them if needed
-->
+ <!-- This allows the user to switch also to the OIO based server -->
+ <osgix:cm-properties id="cmProps" persistent-id="org.apache.james">
+ <prop
key="imapserver.class">org.apache.james.imapserver.netty.IMAPServer</prop>
+ </osgix:cm-properties>
+
+ <!-- placeholder configurer -->
+ <ctx:property-placeholder properties-ref="cmProps" />
<!--
IMAP Server
-->
- <bean id="imapserver"
class="org.apache.james.imapserver.netty.IMAPServer"/>
+ <bean id="imapserver" class="${imapserver.class}"/>
</beans>
Modified:
james/server/trunk/lmtpserver/src/main/resources/META-INF/spring/lmtpserver-context.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/lmtpserver/src/main/resources/META-INF/spring/lmtpserver-context.xml?rev=1141837&r1=1141836&r2=1141837&view=diff
==============================================================================
---
james/server/trunk/lmtpserver/src/main/resources/META-INF/spring/lmtpserver-context.xml
(original)
+++
james/server/trunk/lmtpserver/src/main/resources/META-INF/spring/lmtpserver-context.xml
Fri Jul 1 06:37:31 2011
@@ -14,18 +14,27 @@
governing permissions and limitations ! ! under the License. !
-->
-
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:camel="http://camel.apache.org/schema/spring"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xmlns:ctx="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
<!-- Import PostBeanProcessors -->
<import
resource="classpath*:org/apache/james/container/spring/server-context.xml"/>
+ <!-- Configuration Admin entries so the user can overwrite them if needed
-->
+ <!-- This allows the user to switch also to the OIO based server -->
+ <osgix:cm-properties id="cmProps" persistent-id="org.apache.james">
+ <prop
key="lmtpserver.class">org.apache.james.lmtpserver.netty.LMTPServer</prop>
+ </osgix:cm-properties>
+
<!--
- SMTP Server
+ LMTP Server
-->
- <bean id="lmtpserver"
class="org.apache.james.lmtpserver.netty.LMTPServer"/>
+ <bean id="lmtpserver" class="${lmtpserver.class}"/>
</beans>
Modified:
james/server/trunk/pop3server/src/main/resources/META-INF/spring/pop3server-context.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/pop3server/src/main/resources/META-INF/spring/pop3server-context.xml?rev=1141837&r1=1141836&r2=1141837&view=diff
==============================================================================
---
james/server/trunk/pop3server/src/main/resources/META-INF/spring/pop3server-context.xml
(original)
+++
james/server/trunk/pop3server/src/main/resources/META-INF/spring/pop3server-context.xml
Fri Jul 1 06:37:31 2011
@@ -17,15 +17,28 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:camel="http://camel.apache.org/schema/spring"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xmlns:ctx="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
<!-- Import PostBeanProcessors -->
<import
resource="classpath*:org/apache/james/container/spring/server-context.xml"/>
+ <!-- Configuration Admin entries so the user can overwrite them if needed
-->
+ <!-- This allows the user to switch also to the OIO based server -->
+ <osgix:cm-properties id="cmProps" persistent-id="org.apache.james">
+ <prop
key="pop3server.class">org.apache.james.pop3server.netty.POP3Server</prop>
+ </osgix:cm-properties>
+
+ <!-- placeholder configurer -->
+ <ctx:property-placeholder properties-ref="cmProps" />
+
<!--
POP3 Server
-->
- <bean id="pop3server"
class="org.apache.james.pop3server.netty.POP3Server"/>
+ <bean id="pop3server" class="${pop3server.class}"/>
</beans>
Modified:
james/server/trunk/smtpserver/src/main/resources/META-INF/spring/smtpserver-context.xml
URL:
http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/main/resources/META-INF/spring/smtpserver-context.xml?rev=1141837&r1=1141836&r2=1141837&view=diff
==============================================================================
---
james/server/trunk/smtpserver/src/main/resources/META-INF/spring/smtpserver-context.xml
(original)
+++
james/server/trunk/smtpserver/src/main/resources/META-INF/spring/smtpserver-context.xml
Fri Jul 1 06:37:31 2011
@@ -14,18 +14,29 @@
governing permissions and limitations ! ! under the License. !
-->
-
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:camel="http://camel.apache.org/schema/spring"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xmlns:ctx="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
<!-- Import PostBeanProcessors -->
<import
resource="classpath*:org/apache/james/container/spring/server-context.xml"/>
+ <!-- Configuration Admin entries so the user can overwrite them if needed
-->
+ <!-- This allows the user to switch also to the OIO based server -->
+ <osgix:cm-properties id="cmProps" persistent-id="org.apache.james">
+ <prop
key="smtpserver.class">org.apache.james.smtpserver.netty.SMTPServer</prop>
+ </osgix:cm-properties>
+
+ <!-- placeholder configurer -->
+ <ctx:property-placeholder properties-ref="cmProps" />
<!--
SMTP Server
-->
- <bean id="smtpserver"
class="org.apache.james.smtpserver.netty.SMTPServer"/>
+ <bean id="smtpserver" class="${smtpserver.class}"/>
</beans>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]