Just noticed i said org.apache.mina.transport.socket.nio.NioDatagramAcceptor
doesn't exist in 2.0.4, i meant to say trunk. can anyone see any issues with
the bean declarations ?
My Decoder class extends org.apache.mina.filter.codec.CumulativeProtocolDecoder
and by using remote debugger it seems to call 'doDecode' repeatedly in a
NioDatagramAcceptor thread after a messageReceived.
>
>
My application (written against MINA 2.0.0-M3) is using
org.apache.mina.transport.socket.nio.NioDatagramAcceptor.
I notice this class has been removed/relocated since that version, what UDP
Datagram acceptor should be utilised for 2.0.4 release?
<!-- UDP Datagram acceptor -->
<bean id="ioAcceptor"
class="org.apache.mina.transport.socket.nio.NioDatagramAcceptor"
init-method="bind"
destroy-method="unbind">
<property name="defaultLocalAddress" value="${itel.se.udp.port}"/>
<property name="handler" ref="seIoHandler"/>
<property name="filterChainBuilder" ref="filterChainBuilder"/>
</bean>
<!-- The filter chain. -->
<bean id="filterChainBuilder"
class="org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder">
<property name="filters">
<map>
<entry key="codecFilter" value-ref="codecFilter"/>
<entry key="loggingFilter" value-ref="loggingFilter"/>
<entry key="threadPoolFilter" value-ref="ioEventThreadPool"/>
</map>
</property>
</bean>
<!-- the IoFilters -->
<bean id="codecFilter" class="org.apache.mina.filter.codec.ProtocolCodecFilter">
<constructor-arg ref="receiverCodecFactory"/>
</bean>
<bean id="loggingFilter" class="org.apache.mina.filter.logging.LoggingFilter"/>
<bean id="ioEventThreadPool"
class="org.apache.mina.filter.executor.ExecutorFilter">
<constructor-arg>
<bean class="java.util.concurrent.ThreadPoolExecutor"
init-method="prestartAllCoreThreads" lazy-init="false"
destroy-method="shutdownNow">
<constructor-arg value="${itel.se.receiver.threadpool.size}"/>
<constructor-arg value="${itel.se.receiver.threadpool.size}"/>
<constructor-arg value="60"/>
<constructor-arg>
<util:constant
static-field="java.util.concurrent.TimeUnit.SECONDS" />
</constructor-arg>
<constructor-arg>
<bean class="java.util.concurrent.LinkedBlockingQueue"/>
</constructor-arg>
</bean>
</constructor-arg>
<constructor-arg>
<util:list>
<util:constant
static-field="org.apache.mina.core.session.IoEventType.MESSAGE_RECEIVED"/>
<util:constant
static-field="org.apache.mina.core.session.IoEventType.MESSAGE_SENT"/>
</util:list>
</constructor-arg>
</bean>
your guidance is appreciated.
Brendan
-----Original Message-----
From: Emmanuel Lécharny [mailto:[email protected]]
Sent: 14 July 2012 00:09
To: [email protected]
Subject: Re: Upgrade considerations between MINA 2.0.0-M3 to 2.0.4
Le 7/13/12 11:50 PM, [email protected] a écrit :
> Using 2.0.0-M3 i can receive a request and send back a response, but
> as soon as i
> Use 2.0.4 it does not return response.
I would carefully review your code to see why you don't receive a
response. M3 is severely buggy, and maybe the code you have developped
(or maintaining) has been crafted to workaround M3 limitations. Just
keep in mind that M3 is four years old, and since then, 9 versions have
been released, all of them fixing serious bugs...
> Jvm limits change may mask issue.
Doubtful.
> Even switching to 2.0.0-M4 and other later releases does not improve
> situation.
So that means something has changed between M3 and M4 that makes your
code not working anymore. Either you try to check what changed between
M3 and M4, or you check your code's logic to see where it can be wrong...
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com