Hi all,
I noticed that user code gets executed inside NIO Poller thread in case
of timeout error, if the executor is specified in server.xml.
Since there is very few poller threads, I guess it is not really a good
idea that the user code run in case of timeouts is run within the Poller
thread.
Here the call stack where it occurs for me (baseline 6.0.14).
[EMAIL PROTECTED] daemon, priority=5, in group 'main', status:
'RUNNING'
error():149, Halley.java
event():68, Halley.java =>Implementation of CometProcessor.event()
internalDoFilterEvent():470, ApplicationFilterChain.java
doFilterEvent():363, ApplicationFilterChain.java
event():422, StandardWrapperValve.java
event():252, StandardContextValve.java
event():179, StandardHostValve.java
event():200, ValveBase.java
event():128, StandardEngineValve.java
event():175, CoyoteAdapter.java
event():749, Http11NioProcessor.java
event():637, Http11NioProtocol.java
run():2009, NioEndpoint.java
processSocket():1127, NioEndpoint.java
cancelledKey():1377, NioEndpoint.java
timeout():1611, NioEndpoint.java
run():1452, NioEndpoint.java
run():595, Thread.java
Do you think that this code could be executed within an "executor"
thread instead ?
I think that the following lines (in cancelledKey(),
NioEndpoint.java)may be changed from:
processSocket(ka.getChannel(), status, false);//don't dispatch if the
lines below are cancelling the key
if (status == SocketStatus.TIMEOUT ) return; // don't close on comet
timeout
to:
processSocket(ka.getChannel(), status, status ==
SocketStatus.TIMEOUT);//don't dispatch if the lines below are cancelling
the key
if (status == SocketStatus.TIMEOUT ) return; // don't close on comet
timeout
Best regards,
Christophe Pierret