You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by jc...@apache.org on 2006/11/21 19:03:15 UTC
svn commit: r477791 -
/directory/sandbox/jconlon/osgi-mina/mina-osgi-example/src/main/resources/META-INF/spring/serverContext.xml
Author: jconlon
Date: Tue Nov 21 10:03:14 2006
New Revision: 477791
URL: http://svn.apache.org/viewvc?view=rev&rev=477791
Log:
Added note on using properties files for configuration
Modified:
directory/sandbox/jconlon/osgi-mina/mina-osgi-example/src/main/resources/META-INF/spring/serverContext.xml
Modified: directory/sandbox/jconlon/osgi-mina/mina-osgi-example/src/main/resources/META-INF/spring/serverContext.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/jconlon/osgi-mina/mina-osgi-example/src/main/resources/META-INF/spring/serverContext.xml?view=diff&rev=477791&r1=477790&r2=477791
==============================================================================
--- directory/sandbox/jconlon/osgi-mina/mina-osgi-example/src/main/resources/META-INF/spring/serverContext.xml (original)
+++ directory/sandbox/jconlon/osgi-mina/mina-osgi-example/src/main/resources/META-INF/spring/serverContext.xml Tue Nov 21 10:03:14 2006
@@ -3,11 +3,31 @@
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.xsd">
- <!-- regular spring configuration file defining simple service
- bean. We've kept the osgi definitions in a separate
- configuration file so that this file can easily be used
- for testing outside of an OSGi environment -->
+ <!-- This is a regular spring configuration file defining our server beans.
+ It is very similar to the one used in the mina chat example. We've
+ kept the osgi definitions in a separate configuration file so that
+ this file can easily be used for testing outside of an OSGi environment -->
+ <!-- One aspect of the spring-osgi conventions is that this file is contained
+ within the jar/bundle and not easy to change by system administrators
+ without unpacking it and rearchiving it. If this is too inconvienent that
+ a property file mechanism can be offered with the Spring
+ PropertyPlaceholderConfigurer.
+
+ For example given a server.properties file exists in the working directory
+ where the OSGi runtime is executed, specifying the following will allow
+ the use of variables ${property-name} through out this file to be replaced
+ by values from the properties file.
+
+ <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
+ id="propertyConfigurer">
+ <property name="location">
+ <bean class="org.springframework.core.io.FileSystemResource">
+ <constructor-arg value="server.properties"/>
+ </bean>
+ </property>
+ </bean>
+ -->
<!-- This makes it possible to specify java.net.SocketAddress values
(e.g. :1234 below) as Strings.
They will be converted into java.net.InetSocketAddress objects by Spring. -->