Emmanuel Lecharny wrote:
Mathieu Sacrispeyre wrote:
Hello,
Hi,
I have a project which is working fine with mina 2.00 M5 and serial
transportation.
I tried to update to rc1 but it do not work anymore.
There is an handler that adds a protocol codec filter to the 2 placed
by its superclass in the filterchain of the session.
Something like this :
connector.getFilterChain().addLast(PROTOCOL_NAME_TRANSPORT,
new ProtocolCodecFilter(new
TransportProtocolCodecFactory()));
connector.getFilterChain().addLast(PROTOCOL_NAME_BUSINESS,
new ProtocolCodecFilter(new
BusinessProtocolCodecFactory()));
Then in the child handler :
connector.getFilterChain().addBefore(ADlMinaHandler.PROTOCOL_NAME_HIGH,
PROTOCOL_NAME_INTERMEDIATE,
intermediateProtocolCodecFilter);
With the rc1 version when calling session.write, it ends with a
stackoverflow iterating on these lines :
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:508)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$7(DefaultIoFilterChain.java:502)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:807)
at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolEncoderOutputImpl.flushWithoutFuture(ProtocolCodecFilter.java:435)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:301)
It seems that it is looping on the business and intermediate protocol
filters without any call to the transport one : the content of the
resulting filterchain or the way entries are iterated may have
changed between the 2 versions...?
Before having a deeper look at the issue, I wanted to know/confirm :
- if this is a known issue (haven't seen something about that on this
mailing list...)
No, AFAICT
- if the use of mina described here is correct
Enqueueing two codecs is a bit courageous...
May you give some precisions about the "courageous" aspect? Is it a
performance concern?
It's difficult to say what's going on at this point. Can you create a
JIRA and attach a minimal sample for us to test it ?
Ok I'll create a simplified sample based on my project later in the week.
Thanks !