Re: ProtocolEncoder not getting used in the response path

2016-10-25 Thread Murty Devarakonda
Thank you so much for accepting my suggestion and hope that helps the future developers. And thanks for your support over the past few days too!!! -- View this message in context: http://apache-mina.10907.n7.nabble.com/ProtocolEncoder-not-getting-used-in-the-response-path-tp51558p51620.html

Re: ProtocolEncoder not getting used in the response path

2016-10-25 Thread Emmanuel Lécharny
Le 25/10/16 à 16:54, Murty Devarakonda a écrit : > We could identify what the problem is at last. While sending the response > back to the client, we created a IoBuffer and added the bytes to the same > and did a session.write(). And we identified that if the response is of > type IoBuffer,

Re: ProtocolEncoder not getting used in the response path

2016-10-25 Thread Murty Devarakonda
We could identify what the problem is at last. While sending the response back to the client, we created a IoBuffer and added the bytes to the same and did a session.write(). And we identified that if the response is of type IoBuffer, Mina filter chain won't act on invoke the filters based on

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Murty Devarakonda
And not only that. I am seeing that the filter for my ProtocolCodecFilter also was not hit in the entry.getNextFilter() call. -- View this message in context: http://apache-mina.10907.n7.nabble.com/ProtocolEncoder-not-getting-used-in-the-response-path-tp51558p51605.html Sent from the Apache

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Murty Devarakonda
O.K. Some more progress. While going through the debugger in the file DefaultIoFilterChain.java and in the filterWrite method (line 734 and remember I am in MINA version 2.0.5), I tried to inspect the nextFilter argument and I got an exception in my eclipse: com.sun.jdi.InvocationException

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Emmanuel Lécharny
Le 24/10/16 à 19:24, Murty Devarakonda a écrit : > I did read that section to see where things may be going wrong and didn't see > anything that's different than what we are doing. > > Now, to explain a bit about our project, so far the MINA server is listening > on one port and protocol encoder

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Emmanuel Lécharny
Le 24/10/16 à 20:59, Murty Devarakonda a écrit : > Thank you for the tip. I looked into the NioSocketSession.filterChain and I > could see my protocolcodecfactory object there. Here is how I am adding the > filters: > > protected static void addFilters(Properties props, NioSocketAcceptor >

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Murty Devarakonda
Thank you for the tip. I looked into the NioSocketSession.filterChain and I could see my protocolcodecfactory object there. Here is how I am adding the filters: protected static void addFilters(Properties props, NioSocketAcceptor acceptor, ProtocolCodecFactory factory) {

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Murty Devarakonda
I did read that section to see where things may be going wrong and didn't see anything that's different than what we are doing. Now, to explain a bit about our project, so far the MINA server is listening on one port and protocol encoder and decoder seems to be working fine. Recently we changed

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Emmanuel Lécharny
Le 24/10/16 à 19:12, Murty Devarakonda a écrit : > Thanks for the reply. I set the logging at the debug level for all the code > in org.apache and didn't see any exceptions being thrown or any error > messages. I tried to debug the MINA code, but didn't get much clues from it > in terms of any

Re: ProtocolEncoder not getting used in the response path

2016-10-24 Thread Murty Devarakonda
Thanks for the reply. I set the logging at the debug level for all the code in org.apache and didn't see any exceptions being thrown or any error messages. I tried to debug the MINA code, but didn't get much clues from it in terms of any eye popping error flows. -- View this message in

Re: ProtocolEncoder not getting used in the response path

2016-10-23 Thread Emmanuel Lécharny
Le 23/10/16 à 19:45, Murty Devarakonda a écrit : > I wrote a custom Protocol Encoder implementing the ProtocolEncoder interface > and I am using MINA 2.0.5 version. Mina 2.0.5 is 4 years old. 2.0.16 is currently being release, I strongly suggest you switch to this version taht will be out next

Re: ProtocolEncoder not getting used in the response path

2016-10-23 Thread 李庆松1
If you can't debug the filter, that means some exception is probably thrown before entering into the filter. So you can debug the process from the handler to the filter to check the point where exception happens. > On 24 Oct 2016, at 3:11 AM, Murty Devarakonda