Skip to content

Commit

Permalink
Bumped up the spring dependency to a more recent version
Browse files Browse the repository at this point in the history
  • Loading branch information
elecharny committed Oct 26, 2024
1 parent 227277f commit 870cfaa
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
<bean id="sslContextFactory" class="org.apache.mina.filter.ssl.SslContextFactory">
<property name="protocol" value="TLS"/>
<property name="keyManagerFactoryAlgorithm" value="SunX509"/>
<property name="keyManagerFactoryKeyStore"><ref local="keyStore"/></property>
<property name="keyManagerFactoryKeyStore"><ref bean="keyStore"/></property>
<property name="keyManagerFactoryKeyStorePassword" value="boguspw"/>
<property name="trustManagerFactory"><ref local="bogusTrustManagerFactory"/></property>
<property name="trustManagerFactory"><ref bean="bogusTrustManagerFactory"/></property>
</bean>

<bean id="sslContext" factory-bean="sslContextFactory" factory-method="newInstance"/>
Expand Down Expand Up @@ -130,7 +130,7 @@
<property name="beans">
<map>
<entry key="chatServer:name=ioHandler">
<ref local="chatHandler"/>
<ref bean="chatHandler"/>
</entry>
</map>
</property>
Expand All @@ -140,7 +140,7 @@
</bean>
</property>
<property name="server">
<ref local="mbeanServer"/>
<ref bean="mbeanServer"/>
</property>
</bean>

Expand Down
7 changes: 6 additions & 1 deletion mina-integration-xbean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<artifactId>spring-beans</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,98 @@
-->

<spring:beans xmlns:spring="http://xbean.apache.org/schemas/spring/1.0"
xmlns:s="http://www.springframework.org/schema/beans"
xmlns="http://mina.apache.org/config/1.0">
xmlns:s="http://www.springframework.org/schema/beans">
<!-- Initialize datagramAcceptor0 -->
<bean class="org.apache.mina.transport.socket.nio.NioDatagramAcceptor" id="datagramAcceptor0"/>

<!-- Initialize datagramAcceptor1 -->
<bean class="org.apache.mina.transport.socket.nio.NioDatagramAcceptor" id="datagramAcceptor1">
<property name="defaultLocalAddress" value="192.168.0.1:110"/>
</bean>

<!-- Initialize datagramAcceptor2 -->
<bean class="org.apache.mina.transport.socket.nio.NioDatagramAcceptor" id="datagramAcceptor2">
<constructor-arg ref="taskExecutor"/>
<property name="closeOnDeactivation" value="false"/>
</bean>

<!-- Initialize StandardThreadPool use for datagramAcceptor2 -->
<bean id="taskExecutor" class="org.apache.mina.integration.xbean.StandardThreadPool">
<constructor-arg name="maxThreads" value="4"/>
</bean>

<!-- Initialize datagramAcceptor3 -->
<bean class="org.apache.mina.transport.socket.nio.NioDatagramAcceptor" id="datagramAcceptor3">
<property name="defaultLocalAddresses">
<list>
<ref bean="socketAddress0"/>
<ref bean="socketAddress1"/>
<ref bean="socketAddress2"/>
</list>
</property>
</bean>

<!-- Initialize 1st-3rd InetSocketAddress as list in datagramAcceptor3 -->
<bean id="socketAddress0" class="java.net.InetSocketAddress">
<constructor-arg ref="byAddress0" index="0"/>
<constructor-arg value="10001" index="1"/>
</bean>

<nioDatagramAcceptor id="datagramAcceptor0" />
<bean id="socketAddress1" class="java.net.InetSocketAddress">
<constructor-arg ref="byAddress1" index="0"/>
<constructor-arg value="10002" index="1"/>
</bean>

<nioDatagramAcceptor id="datagramAcceptor1" defaultLocalAddress="192.168.0.1:110" />
<bean id="socketAddress2" class="java.net.InetSocketAddress">
<constructor-arg ref="byAddress2" index="0"/>
<constructor-arg value="10003" index="1"/>
</bean>

<nioDatagramAcceptor id="datagramAcceptor2" executor="#threadPoolExecutor" closeOnDeactivation="false" />
<!-- Initialize 192.168.0.1 as byte[] for input of InetSocketAddress->socketAddress0 -->
<bean id="byAddress0" class="java.net.InetAddress" factory-method="getByAddress">
<constructor-arg>
<array>
<value>-64</value>
<value>-88</value>
<value>0</value>
<value>1</value>
</array>
</constructor-arg>
</bean>

<nioDatagramAcceptor id="datagramAcceptor3">
<defaultLocalAddresses>
<socketAddress>192.168.0.1:10001</socketAddress>
<socketAddress>192.168.0.2:10002</socketAddress>
<socketAddress>192.168.0.3:10003</socketAddress>
</defaultLocalAddresses>
</nioDatagramAcceptor>
<!-- Initialize 192.168.0.2 as byte[] for input of InetSocketAddress->socketAddress1 -->
<bean id="byAddress1" class="java.net.InetAddress" factory-method="getByAddress">
<constructor-arg>
<array>
<value>-64</value>
<value>-88</value>
<value>0</value>
<value>2</value>
</array>
</constructor-arg>
</bean>

<!-- Initialize 192.168.0.3 as byte[] for input of InetSocketAddress->socketAddress2 -->
<bean id="byAddress2" class="java.net.InetAddress" factory-method="getByAddress">
<constructor-arg>
<array>
<value>-64</value>
<value>-88</value>
<value>0</value>
<value>3</value>
</array>
</constructor-arg>
</bean>

<nioDatagramAcceptor id="datagramAcceptor4" />

<standardThreadPool id="threadPoolExecutor" maxThreads="4"/>

<!--
Sets up the MinaPropertyEditorRegistrar which conveniently installs all the
required MINA PropertyEditor implementations found in the MINA Integration
Beans module.
Sets up the MinaPropertyEditorRegistrar which conveniently installs all the
required MINA PropertyEditor implementations found in the MINA Integration
-->
<s:bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<s:property name="propertyEditorRegistrars">
<s:list>
<s:bean class="org.apache.mina.integration.xbean.MinaPropertyEditorRegistrar"/>
</s:list>
</s:property>
</s:bean>
</s:bean>
</spring:beans>
34 changes: 16 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@
<version.slf4j.api>1.7.36</version.slf4j.api>
<version.slf4j.reload4j>1.7.36</version.slf4j.reload4j>
<version.slf4j.jcl.over.slf4j>1.7.36</version.slf4j.jcl.over.slf4j>
<version.springframework>2.5.6.SEC03</version.springframework>
<version.springframework>5.3.39</version.springframework>
<version.springframework.old>2.5.6.SEC03</version.springframework.old>
<version.tomcat.jni>10.0.27</version.tomcat.jni>
<version.xbean.spring>4.25</version.xbean.spring>

<!-- OSGi minimum versions -->
<osgi-min-version.slf4j.api>1.7</osgi-min-version.slf4j.api>


<!-- Define the Java source and target version -->
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
Expand Down Expand Up @@ -255,21 +257,19 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${version.springframework.old}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${version.springframework}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${version.springframework}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -470,7 +470,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
<configuration>
<optimize>true</optimize>
<showDeprecation>true</showDeprecation>
<encoding>ISO-8859-1</encoding>
</configuration>
Expand Down Expand Up @@ -817,7 +816,6 @@
<configuration>
<encoding>UTF-8</encoding>
<debug>true</debug>
<optimize>true</optimize>
<showDeprecations>true</showDeprecations>
</configuration>
</plugin>
Expand Down

0 comments on commit 870cfaa

Please sign in to comment.