I think I have uncovered a very weird behavior of mina 2.x (latest
trunk).
 
I have a filterchain structure as followed
 
1- My Codec Filter
2- StateMachine Filter 1 (Mina state-machine)
3- StateMachine Filter 2 (Mina state-machine)
4- executorFilter
5- My Processor Filter
 
On certain usage scenarios, calls to session.write() block!
 
It blocks when DefaultIoFilterChain.callPreviousFilterWrite(){ ...
filterWrite(nf, session, writeRequest); ...} is invoked.
When trying to print the name of the filter that gets invoked
(filter.getClass.getSimpleName()), I get $Proxy46. I would have wanted
to be more precise and put a break point to know what's going on but
since I can only reproduce the scenario 1/10 try, it's a bit hard :.)
 
Nevertheless I got the following order of filters called when it
blocked:
org.apache.mina.common.DefaultIoFilterChain$TailFilter

foo.bar.MyProcessorFilter

org.apache.mina.filter.executor.ExecutorFilter

$Proxy46

$Proxy46

 
I cannot explain why it could have blocked since I don't know where to
start in the Proxy and in Mina StateMachine. Maybe it has to do with my
ExcutorFilter being a
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor instead
of an OrderedThreadPoolExecutor
<http://mina.apache.org/report/trunk/apidocs/org/apache/mina/filter/exec
utor/OrderedThreadPoolExecutor.html> .
 
I would really appreciate any help you can give me on the matter since
this application I am building will go commercial soon. Thanks.
 
 
Simon 

Reply via email to