Hi,

the changes affect the chat server example. Should I open a jira issue? Does
anybody adapt the changes? Can I do it?

The sample configuration still expects the following classes:
org.apache.mina.integration.spring.Binding
org.apache.mina.integration.spring.IoAcceptorFactoryBean
org.apache.mina.common.IoServiceConfig

Another issue are the spring context configuration files. Currently there is
jmxContext.xml and serverContext.xml. Both configuration files contain jmx
stuff. I suggest to merge the 2 configuration files to 1 file for ease of
understanding the example.


Regards
Klaus


Niklas Therning wrote:
> 
> Michael Bauroth wrote:
>> Hi,
>>
>> I have a Spring configured server online. The old config looks like
>> this  (only small part):
>>
>> <bean id="sessionConfig" factory-bean="defaultAcceptorConfig"
>> factory-method="getSessionConfig">
>>   <property name="reuseAddress" value="false"/>
>>   <property name="tcpNoDelay" value="true"/>
>>   <property name="sendBufferSize" value="1024"/>
>>   <property name="receiveBufferSize" value="1024"/>
>>   <property name="soLinger" value="10"/>
>>   <property name="oobInline" value="false"/>
>>   <property name="keepAlive" value="true"/>
>> </bean>
>>
>> <bean id="ioAcceptor"
>> class="org.apache.mina.integration.spring.IoAcceptorFactoryBean">
>>   <property name="target" ref="acceptor"/>
>>   <property name="bindings">
>>     <list>
>>       <bean class="org.apache.mina.integration.spring.Binding">
>>         <property name="address" value=":1234"/>
>>         <property name="handler" ref="TcpServerSessionHandler"/>
>>         <property name="serviceConfig" ref="defaultAcceptorConfig"/>
>>       </bean>
>>     </list>
>>   </property>
>> </bean>
>>     
> The API in trunk has been simplified a lot which is why ServiceCondig,
> IoAcceptorFactoryBean and Binding aren't needed anymore. IoAcceptor now
> binds to a single SocketAddress and you configure it directly using
> setters:
> 
> <bean id="ioAcceptor"
> class="org.apache.mina.transport.socket.nio.SocketAcceptor"
> init-method="bind" destroy-method="unbind">
>   <property name="localAddress" value=":1234"/>
>   <property name="handler" ref="TcpServerSessionHandler"/>
> </bean>
> 
> <bean id="sessionConfig" factory-bean="ioAcceptor"
> factory-method="getSessionConfig">
>   <property name="reuseAddress" value="false"/>
>   <property name="tcpNoDelay" value="true"/>
>   <property name="sendBufferSize" value="1024"/>
>   <property name="receiveBufferSize" value="1024"/>
>   <property name="soLinger" value="10"/>
>   <property name="oobInline" value="false"/>
>   <property name="keepAlive" value="true"/>
> </bean>
> 
> This should work. Please let us know.
> 
> BTW, the above would be a lot cleaner if we had setSessionConfig() on
> SocketAcceptor, DatagramAcceptor, etc. What do people think about adding
> such setters?
> 
> -- 
> Niklas Therning
> www.spamdrain.net
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Mina-trunk-and-Spring-support-%28changes%29-tf2681231.html#a7634760
Sent from the mina dev mailing list archive at Nabble.com.

Reply via email to